I want to learn a proper way of passing query from form to url in Django class based view. I want to retrieve form data in ListView to make query on the model.
I'm currently using this, but i feel that there's a better way. class SearchFormView(FormView): form_class = SearchForm ... def form_valid(self, form): return HttpResponseRedirect('?'+urllib.parse.urlencode(form.data)) -- 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+unsubscr...@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/9d5a3c77-fb84-4234-aed9-f4f8ce941674%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.