django display a row vale

13 views
Skip to first unread message

sum abiut

unread,
Jun 26, 2018, 1:34:16 AM6/26/18
to django...@googlegroups.com
Hi,
i need some assistance, i have a table and want to be able to only display the values of a particular row when ever the particular row is selected.

please point me to right direction.

cheers


Ryan Nowakowski

unread,
Jun 26, 2018, 5:16:05 PM6/26/18
to django...@googlegroups.com
I assume you're talking about an HTML table and not a database table
here. If you wanted to do this with no javascript you could make each
table row a link to the current page with some query parameters that
filter the data down to just that row.

sum abiut

unread,
Jun 26, 2018, 5:44:50 PM6/26/18
to django...@googlegroups.com
Thanks,
Here is my view.py and it works for me

def display_data(request,id):
    selected_objects = minutes.objects.filter(pk__in=id)
    return render(request,'test.html',locals())

cheers,


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20180626211521.GT14746%40fattuba.com.
For more options, visit https://groups.google.com/d/optout.



Reply all
Reply to author
Forward
0 new messages