I am trying to perform a query on the same page using Django. After selecting data from the dropdown and clicking the button, the information should be filtered accordingly.
However, I couldn't find a solution to get the data after selecting from my dropdown and will refresh the page using Django.
Is this possible?
Here's my views.py
class DocListView(ListView):
model = Document
template_name = 'docs/documents.html'
paginate_by = 5
context_object_name = 'doc_list'
def get_queryset(self):
return Document.objects.all()
source https://stackoverflow.com/questions/77806097/sorting-data-refresh-page-with-new-query-django5-listview
Comments
Post a Comment