This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(registerView): add register view
- Loading branch information
1 parent
5afac5e
commit c57f0c1
Showing
2 changed files
with
9 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters