I try to write get method for my class bassed on ListView, I want to get request from form in template and return model with filter from request. This is part of my code:
class SearchListView(ListView):
context_object_name = 'projects_list'
template_name = 'projects/search.html'
paginate_by = 10
def get(self, request, *args, **kwargs):
do smth??
return self.render_to_response(??)
My form:
<form class="well form-search" action="/search/" method="get">
<input type="text" class="input-medium search-query" name="q">
<button type="submit" class="btn">Search</button>
</form>
Plz, give me some example.
No need to rewrite
getmethod.