From 6b96a81edb94972ba48809c01568b8d7a2ceba2a Mon Sep 17 00:00:00 2001 From: Zncl2222 <3002shinning@gmail.com> Date: Sat, 5 Aug 2023 16:16:20 +0800 Subject: [PATCH] style(settings): rename ZWeb_app to core --- backend/{ZWeb_app => core}/__init__.py | 0 backend/{ZWeb_app => core}/asgi.py | 2 +- backend/{ZWeb_app => core}/settings.py | 4 ++-- backend/{ZWeb_app => core}/urls.py | 0 backend/{ZWeb_app => core}/wsgi.py | 2 +- backend/manage.py | 2 +- backend/pytest.ini | 2 +- backend/users/views.py | 2 +- backend/uwsgi.ini | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename backend/{ZWeb_app => core}/__init__.py (100%) rename backend/{ZWeb_app => core}/asgi.py (82%) rename backend/{ZWeb_app => core}/settings.py (98%) rename backend/{ZWeb_app => core}/urls.py (100%) rename backend/{ZWeb_app => core}/wsgi.py (83%) diff --git a/backend/ZWeb_app/__init__.py b/backend/core/__init__.py similarity index 100% rename from backend/ZWeb_app/__init__.py rename to backend/core/__init__.py diff --git a/backend/ZWeb_app/asgi.py b/backend/core/asgi.py similarity index 82% rename from backend/ZWeb_app/asgi.py rename to backend/core/asgi.py index e7e62b5..27b11a9 100644 --- a/backend/ZWeb_app/asgi.py +++ b/backend/core/asgi.py @@ -11,6 +11,6 @@ from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ZWeb_app.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') application = get_asgi_application() diff --git a/backend/ZWeb_app/settings.py b/backend/core/settings.py similarity index 98% rename from backend/ZWeb_app/settings.py rename to backend/core/settings.py index 1f40b82..0beeef9 100644 --- a/backend/ZWeb_app/settings.py +++ b/backend/core/settings.py @@ -75,7 +75,7 @@ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -ROOT_URLCONF = 'ZWeb_app.urls' +ROOT_URLCONF = 'core.urls' TEMPLATES = [ { @@ -99,7 +99,7 @@ 'django.contrib.auth.backends.ModelBackend', ] -WSGI_APPLICATION = 'ZWeb_app.wsgi.application' +WSGI_APPLICATION = 'core.wsgi.application' # Database diff --git a/backend/ZWeb_app/urls.py b/backend/core/urls.py similarity index 100% rename from backend/ZWeb_app/urls.py rename to backend/core/urls.py diff --git a/backend/ZWeb_app/wsgi.py b/backend/core/wsgi.py similarity index 83% rename from backend/ZWeb_app/wsgi.py rename to backend/core/wsgi.py index cf451ed..e51ae20 100644 --- a/backend/ZWeb_app/wsgi.py +++ b/backend/core/wsgi.py @@ -12,6 +12,6 @@ from django.core.wsgi import get_wsgi_application from dj_static import Cling -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ZWeb_app.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') application = Cling(get_wsgi_application()) diff --git a/backend/manage.py b/backend/manage.py index 9064ff3..0eef90d 100644 --- a/backend/manage.py +++ b/backend/manage.py @@ -6,7 +6,7 @@ def main(): """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ZWeb_app.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/backend/pytest.ini b/backend/pytest.ini index 9f902dc..98ee0c8 100644 --- a/backend/pytest.ini +++ b/backend/pytest.ini @@ -1,2 +1,2 @@ [pytest] -DJANGO_SETTINGS_MODULE = ZWeb_app.settings +DJANGO_SETTINGS_MODULE = core.settings diff --git a/backend/users/views.py b/backend/users/views.py index ef3306c..4c065d5 100644 --- a/backend/users/views.py +++ b/backend/users/views.py @@ -1,7 +1,7 @@ from django.core.mail import send_mail from django.shortcuts import redirect from django.utils import timezone -from ZWeb_app import settings +from core import settings from django.utils.crypto import get_random_string from rest_framework import generics, permissions, status diff --git a/backend/uwsgi.ini b/backend/uwsgi.ini index f44d4c3..e048a22 100644 --- a/backend/uwsgi.ini +++ b/backend/uwsgi.ini @@ -2,6 +2,6 @@ http-socket = :$(PORT) master = true die-on-term = true -module = ZWeb_app.wsgi:application +module = core.wsgi:application vacuum=True max-requests=5000