diff --git a/apps/users/forms.py b/apps/users/forms.py index ba23570..84799c2 100644 --- a/apps/users/forms.py +++ b/apps/users/forms.py @@ -1,9 +1,16 @@ +from typing import TYPE_CHECKING + from django.contrib.auth.forms import UserCreationForm from apps.users.models import User +if TYPE_CHECKING: + BaseUserCreationForm = UserCreationForm[User] +else: + BaseUserCreationForm = UserCreationForm + -class CreateUserForm(UserCreationForm[User]): +class CreateUserForm(BaseUserCreationForm): class Meta: model = User fields = ["username", "email", "password1", "password2"] diff --git a/apps/users/urls.py b/apps/users/urls.py index 523a9aa..a3d45bc 100644 --- a/apps/users/urls.py +++ b/apps/users/urls.py @@ -5,5 +5,5 @@ app_name = "users" urlpatterns = [ - path("register/", RegisterView.as_view(), name="register"), + path("", RegisterView.as_view(), name="register"), ]