How to get queryset from get method

28 views
Skip to first unread message

Thiago Luiz Parolin

unread,
Dec 4, 2018, 7:38:24 AM12/4/18
to django...@googlegroups.com
I have a class (Updateview) to handle file upload for a particular model. In this class, I do some validation on the get method that uses a queryset. In get_object and get_context_data I need to do the same query used in the get method, how can I reuse the get method's queryset in another method of the same class?
I do not know if I could explain it correctly, but thanks if anyone can help me.

--
Thiago Luiz Parolin

Gerson David Vizquel Alemán

unread,
Dec 4, 2018, 1:05:23 PM12/4/18
to Django users
Hello Thiago, review this link: http://ccbv.co.uk/

Thiago Luiz Parolin

unread,
Dec 5, 2018, 3:55:24 AM12/5/18
to django...@googlegroups.com
Thanks!!
This site is awesome and will help me a lot 


--
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...@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/d8b0fe72-63ed-4713-ad12-f807402eed1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages