Added djoser

This commit is contained in:
keannu125 2023-02-25 17:57:38 +08:00
parent d1645a6db7
commit 4ad3bedb18
12 changed files with 28 additions and 3 deletions

View file

View file

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

6
project/accounts/apps.py Normal file
View file

@ -0,0 +1,6 @@
from django.apps import AppConfig
class AccountsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'accounts'

View file

View file

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View file

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

5
project/accounts/urls.py Normal file
View file

@ -0,0 +1,5 @@
from django.urls import path, include
urlpatterns = [
path('accounts/', include('djoser.urls')),
]

View file

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

View file

@ -2,5 +2,6 @@ from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('api/v1/', include('notes.urls'))
path('', include('notes.urls')),
path('accounts/', include('djoser.urls')),
]

View file

@ -39,7 +39,8 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'rest_framework',
'notes.apps.NotesConfig',
'corsheaders'
'corsheaders',
'djoser'
]
MIDDLEWARE = [

View file

@ -18,5 +18,5 @@ from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('api.urls'))
path('api/v1/', include('api.urls'))
]

Binary file not shown.