mirror of
https://github.com/lemeow125/Django-NotesApp.git
synced 2024-11-17 06:29:25 +08:00
Added djoser
This commit is contained in:
parent
d1645a6db7
commit
4ad3bedb18
12 changed files with 28 additions and 3 deletions
0
project/accounts/__init__.py
Normal file
0
project/accounts/__init__.py
Normal file
3
project/accounts/admin.py
Normal file
3
project/accounts/admin.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
6
project/accounts/apps.py
Normal file
6
project/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
project/accounts/migrations/__init__.py
Normal file
0
project/accounts/migrations/__init__.py
Normal file
3
project/accounts/models.py
Normal file
3
project/accounts/models.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
# Create your models here.
|
3
project/accounts/tests.py
Normal file
3
project/accounts/tests.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
5
project/accounts/urls.py
Normal file
5
project/accounts/urls.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from django.urls import path, include
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path('accounts/', include('djoser.urls')),
|
||||||
|
]
|
3
project/accounts/views.py
Normal file
3
project/accounts/views.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
|
@ -2,5 +2,6 @@ from django.contrib import admin
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('api/v1/', include('notes.urls'))
|
path('', include('notes.urls')),
|
||||||
|
path('accounts/', include('djoser.urls')),
|
||||||
]
|
]
|
||||||
|
|
|
@ -39,7 +39,8 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'notes.apps.NotesConfig',
|
'notes.apps.NotesConfig',
|
||||||
'corsheaders'
|
'corsheaders',
|
||||||
|
'djoser'
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
|
|
@ -18,5 +18,5 @@ from django.urls import path, include
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('admin/', admin.site.urls),
|
path('admin/', admin.site.urls),
|
||||||
path('', include('api.urls'))
|
path('api/v1/', include('api.urls'))
|
||||||
]
|
]
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue