PavelVavruska/django-oscar — comment on commit c280c4e2308d315df6cc72ed1f28632d941c3392
File: oscar/apps/customer/views.py line 163
By Geekfish:

You should put the whole form instantiation logic in `get()` and put the form instance in `self.filter_form` instead of a local variable - that way the form will be accessible in other methods. In `get_contex_datat()` you can just set `ctx['search_date_form'] = self.filter_form` and keep it simple.

After you can just move the logic below into `get_queryset()` and access the form by referring to `self.filter_form` once again.

Additionally, it is good to maintain a single way for naming variables, stick with either "search_date_form" or "filter_form" but not both.