mirror of
https://github.com/lemeow125/Ivy-Backend.git
synced 2025-06-28 16:45:44 +08:00
Added accounts
This commit is contained in:
parent
9dfdc4aa2f
commit
dab99b17cf
12 changed files with 47 additions and 4 deletions
0
ivy/accounts/__init__.py
Normal file
0
ivy/accounts/__init__.py
Normal file
3
ivy/accounts/admin.py
Normal file
3
ivy/accounts/admin.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
ivy/accounts/apps.py
Normal file
6
ivy/accounts/apps.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AccountsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'accounts'
|
0
ivy/accounts/migrations/__init__.py
Normal file
0
ivy/accounts/migrations/__init__.py
Normal file
3
ivy/accounts/models.py
Normal file
3
ivy/accounts/models.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.db import models
|
||||
|
||||
# Create your models here.
|
3
ivy/accounts/tests.py
Normal file
3
ivy/accounts/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
7
ivy/accounts/urls.py
Normal file
7
ivy/accounts/urls.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('', include('djoser.urls')),
|
||||
path('', include('djoser.urls.authtoken'))
|
||||
]
|
3
ivy/accounts/views.py
Normal file
3
ivy/accounts/views.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
|
@ -2,5 +2,5 @@ from django.contrib import admin
|
|||
from django.urls import path, include
|
||||
|
||||
urlpatterns = [
|
||||
path('', include('djoser.urls'))
|
||||
path('accounts/', include('accounts.urls'))
|
||||
]
|
||||
|
|
|
@ -38,8 +38,8 @@ INSTALLED_APPS = [
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
'djoser',
|
||||
'api',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -124,3 +124,20 @@ STATIC_URL = 'static/'
|
|||
# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field
|
||||
|
||||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||
'rest_framework.authentication.TokenAuthentication',
|
||||
)
|
||||
}
|
||||
|
||||
DJOSER = {
|
||||
'SEND_ACTIVATION_EMAIL': True,
|
||||
'SEND_CONFIRMATION_EMAIL': True,
|
||||
'ACTIVATION_URL': 'activation/{uid}/{token}',
|
||||
}
|
||||
|
||||
EMAIL_HOST = 'sandbox.smtp.mailtrap.io'
|
||||
EMAIL_HOST_USER = '54ff6949e39105'
|
||||
EMAIL_HOST_PASSWORD = 'c59d3eaa05f98d'
|
||||
EMAIL_PORT = '2525'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue