mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2025-04-27 10:11:24 +08:00
Added user model
This commit is contained in:
parent
6ec649b1c6
commit
1c56369044
15 changed files with 659 additions and 128 deletions
|
@ -65,7 +65,8 @@ INSTALLED_APPS = [
|
|||
'rest_framework',
|
||||
'rest_framework_simplejwt',
|
||||
'djoser',
|
||||
'corsheaders'
|
||||
'corsheaders',
|
||||
'accounts'
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -139,11 +140,21 @@ DATABASES = {
|
|||
}
|
||||
}
|
||||
|
||||
AUTH_USER_MODEL = 'accounts.CustomUser'
|
||||
|
||||
DJOSER = {
|
||||
'SEND_ACTIVATION_EMAIL': True,
|
||||
'SEND_CONFIRMATION_EMAIL': True,
|
||||
'EMAIL': {
|
||||
'activation': 'config.email.ActivationEmail'
|
||||
},
|
||||
'ACTIVATION_URL': 'activation/{uid}/{token}',
|
||||
'USER_AUTHENTICATION_RULES': ['djoser.authentication.TokenAuthenticationRule'],
|
||||
'SERIALIZERS': {
|
||||
'user': 'accounts.serializers.CustomUserSerializer',
|
||||
'current_user': 'accounts.serializers.CustomUserSerializer',
|
||||
'user_create': 'accounts.serializers.UserRegistrationSerializer',
|
||||
},
|
||||
}
|
||||
|
||||
# Password validation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue