From d905d6f26b76e80e21899a81736fdbe93d3625d5 Mon Sep 17 00:00:00 2001 From: Mike0001-droid Date: Fri, 31 May 2024 11:57:47 +0500 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BD=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BF=D0=B0?= =?UTF-8?q?=D0=BF=D0=BE=D0=BA=20=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/proj/audio/apps.py | 4 ++-- server/proj/conf/asgi.py | 2 +- server/proj/conf/db.sqlite3 | 0 server/proj/conf/settings/__init__.py | 9 ++++++++- server/proj/conf/settings/base.py | 3 +-- server/proj/conf/urls.py | 12 ++++++------ server/proj/conf/wsgi.py | 2 +- server/proj/manage.py | 2 +- 8 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 server/proj/conf/db.sqlite3 diff --git a/server/proj/audio/apps.py b/server/proj/audio/apps.py index 12bf055..15fa721 100644 --- a/server/proj/audio/apps.py +++ b/server/proj/audio/apps.py @@ -1,6 +1,6 @@ from django.apps import AppConfig -class MediaConfig(AppConfig): +class AudioConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' - name = 'media' + name = 'audio' diff --git a/server/proj/conf/asgi.py b/server/proj/conf/asgi.py index b255670..53a6670 100644 --- a/server/proj/conf/asgi.py +++ b/server/proj/conf/asgi.py @@ -11,6 +11,6 @@ import os from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ITRadioBackend.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'conf.settings') application = get_asgi_application() diff --git a/server/proj/conf/db.sqlite3 b/server/proj/conf/db.sqlite3 new file mode 100644 index 0000000..e69de29 diff --git a/server/proj/conf/settings/__init__.py b/server/proj/conf/settings/__init__.py index 773cfc4..e0a19b2 100644 --- a/server/proj/conf/settings/__init__.py +++ b/server/proj/conf/settings/__init__.py @@ -1 +1,8 @@ -from .base import * \ No newline at end of file + +from .development import * + + + + + + diff --git a/server/proj/conf/settings/base.py b/server/proj/conf/settings/base.py index 6f9f209..677c90c 100644 --- a/server/proj/conf/settings/base.py +++ b/server/proj/conf/settings/base.py @@ -42,7 +42,6 @@ INSTALLED_APPS = [ 'rubricks', 'loginApi', 'userProfile', - 'sheduler', 'audio', 'api' @@ -201,4 +200,4 @@ SIMPLE_JWT = { CORS_ALLOW_CREDENTIALS = True CORS_ALLOWED_ORIGINS = [ 'http://localhost:5173', -] \ No newline at end of file +] diff --git a/server/proj/conf/urls.py b/server/proj/conf/urls.py index f842901..1f3a6f8 100644 --- a/server/proj/conf/urls.py +++ b/server/proj/conf/urls.py @@ -1,5 +1,5 @@ from django.contrib import admin -from rest_framework.documentation import include_docs_urls +#from rest_framework.documentation import include_docs_urls from django.urls import path, include # from api.views import AzuraNowPlayingWebhookView from loginApi.views import login, register @@ -20,15 +20,15 @@ router.register(r'news', newsViews.NewsViewSet) router.register(r'profiles', ProfileViewSet, basename='profiles') urlpatterns = [ - path('admin/', admin.site.urls), - + path('api/admin/', admin.site.urls), + path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('api/token/verify/', TokenVerifyView.as_view(), name='token_verify'), - path('api/', include_docs_urls(title='API docs')), - path('', include(router.urls)), + #path('api/', include_docs_urls(title='API docs')), + path('api/', include(router.urls)), path('api-auth/', include('rest_framework.urls', namespace='rest_framework')), - + # path('webhook/', AzuraNowPlayingWebhookView.as_view(), name='webhook-receiver'), path('api/login/', login, name='login'), path('api/register/', register, name='register'), diff --git a/server/proj/conf/wsgi.py b/server/proj/conf/wsgi.py index 861768d..f4b77ee 100644 --- a/server/proj/conf/wsgi.py +++ b/server/proj/conf/wsgi.py @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ITRadioBackend.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'conf.settings') application = get_wsgi_application() diff --git a/server/proj/manage.py b/server/proj/manage.py index 6cd5b1e..547e42b 100644 --- a/server/proj/manage.py +++ b/server/proj/manage.py @@ -6,7 +6,7 @@ import sys def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ITRadioBackend.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'conf.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: