Tuesday, December 4, 2018

How to get queryset from get method

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

--
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-users@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/CANbmKyvFhCuyDjENxn8YxBJz71rXK3AH%2Bh9W16EuNnBhRVRLOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment