Skip to content

Commit

Permalink
created new user app
Browse files Browse the repository at this point in the history
  • Loading branch information
bcg0006 committed Apr 23, 2024
1 parent d73e983 commit c410b4d
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 3 deletions.
12 changes: 10 additions & 2 deletions app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@
# Application definition

INSTALLED_APPS = [

'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'core'
'core',
'rest_framework',
'drf_spectacular',
'user',
]

MIDDLEWARE = [
Expand Down Expand Up @@ -132,4 +136,8 @@
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'


AUTH_USER_MODEL = 'core.User'
AUTH_USER_MODEL = 'core.User'

REST_FRAMEWORK = {
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
}
3 changes: 3 additions & 0 deletions app/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"""
from django.contrib import admin
from django.urls import path
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView

urlpatterns = [
path('admin/', admin.site.urls),
path('api/schema/',SpectacularAPIView.as_view(), name='api-schema'),
path('api/docs/', SpectacularSwaggerView.as_view(url_name='api-schema'), name='api-docs'),
]
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Django >=3.2.4, <3.3
Django >=3.2.4, <3.3
djangorestframework >=3.12.4, <3.13
psycopg2 >=2.8.6, <2.9
drf-spectacular == 0.15.1
Empty file added user/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions user/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class UserConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'user'
Empty file added user/migrations/__init__.py
Empty file.
Empty file added user/tests/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions user/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.

0 comments on commit c410b4d

Please sign in to comment.