Added the documentation to the get_form_class() method in the FormView in the Mia core application.

This commit is contained in:
依瑪貓 2020-08-16 10:40:31 +08:00
parent 38df53d73a
commit 3794735df9

View File

@ -105,7 +105,8 @@ class FormView(View):
return redirect(str(UrlBuilder(self.get_success_url())
.query(r=self.request.GET.get("r"))))
def get_form_class(self):
def get_form_class(self) -> Type[forms.Form]:
"""Returns the form class."""
if self.form_class is None:
raise AttributeError("Please defined the form_class property.")
return self.form_class