def get(self, request, *args, **kwargs):
        self.request = request

        form_class = self.get_form_class()
        form = self.get_form(form_class)

        if "q" in self.request.GET:
            if form.is_valid():
                return self.form_valid(form)
            else:
                self.form_invalid(form)
        else:
            return self.render_to_response(self.get_context_data(form=form))
dataset/ETHPy150Open crate-archive/crate-site/crateweb/apps/search/views.py/Search.get/original