Returns the keyword arguments for instantiating the form.
(self)
| 55 | return self.queryset |
| 56 | |
| 57 | def get_form_kwargs(self): |
| 58 | """ |
| 59 | Returns the keyword arguments for instantiating the form. |
| 60 | """ |
| 61 | kwargs = {"initial": self.get_initial()} |
| 62 | if self.request.method in ["HEAD", "GET"]: |
| 63 | kwargs.update({"data": self.request.GET}) |
| 64 | kwargs.update( |
| 65 | {"searchqueryset": self.get_queryset(), "load_all": self.load_all} |
| 66 | ) |
| 67 | return kwargs |
| 68 | |
| 69 | def form_invalid(self, form): |
| 70 | context = self.get_context_data( |