Added a custom user serializer to allow sorting of notes by user

This commit is contained in:
Keannu Christian Bernasol 2023-03-01 23:27:46 +08:00
parent 65ad4a5f21
commit ff7934407a
5 changed files with 23 additions and 2 deletions

View file

@ -41,7 +41,8 @@ INSTALLED_APPS = [
'rest_framework.authtoken',
'notes.apps.NotesConfig',
'corsheaders',
'djoser'
'djoser',
'accounts',
]
MIDDLEWARE = [
@ -146,6 +147,9 @@ DJOSER = {
'SEND_ACTIVATION_EMAIL': True,
'SEND_CONFIRMATION_EMAIL': True,
'ACTIVATION_URL': 'activation/{uid}/{token}',
'SERIALIZERS': {
'user': 'accounts.serializers.CustomUserSerializer'
},
}
EMAIL_HOST = 'sandbox.smtp.mailtrap.io'