diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..23fd35f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} \ No newline at end of file diff --git a/SMS/asgi.py b/SMS/asgi.py deleted file mode 100644 index 83459d0..0000000 --- a/SMS/asgi.py +++ /dev/null @@ -1,13 +0,0 @@ -import os - -import django -from channels.http import AsgiHandler -from channels.routing import ProtocolTypeRouter - -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SMS.settings') -django.setup() - -application = ProtocolTypeRouter({ - "http": AsgiHandler(), - # Just HTTP for now. (We can add other protocols later.) -}) diff --git a/accounts/migrations/0015_alter_user_managers.py b/accounts/migrations/0015_alter_user_managers.py new file mode 100644 index 0000000..bc3f8b3 --- /dev/null +++ b/accounts/migrations/0015_alter_user_managers.py @@ -0,0 +1,20 @@ +# Generated by Django 4.0.8 on 2023-12-25 20:16 + +import accounts.models +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('accounts', '0014_alter_user_managers'), + ] + + operations = [ + migrations.AlterModelManagers( + name='user', + managers=[ + ('objects', accounts.models.UserManager()), + ], + ), + ] diff --git a/SMS/__init__.py b/config/__init__.py similarity index 100% rename from SMS/__init__.py rename to config/__init__.py diff --git a/config/asgi.py b/config/asgi.py new file mode 100644 index 0000000..c6674cb --- /dev/null +++ b/config/asgi.py @@ -0,0 +1,15 @@ +import os + +import django +from channels.http import AsgiHandler +from channels.routing import ProtocolTypeRouter + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") +django.setup() + +application = ProtocolTypeRouter( + { + "http": AsgiHandler(), + # Just HTTP for now. (We can add other protocols later.) + } +) diff --git a/SMS/settings.py b/config/settings.py similarity index 97% rename from SMS/settings.py rename to config/settings.py index 1ddddd2..2ae0da9 100644 --- a/SMS/settings.py +++ b/config/settings.py @@ -1,5 +1,5 @@ """ -Django settings for SMS project. +Django settings for config project. Generated by 'django-admin startproject' using Django 2.2.3. @@ -75,7 +75,7 @@ "django.middleware.clickjacking.XFrameOptionsMiddleware", ] -ROOT_URLCONF = "SMS.urls" +ROOT_URLCONF = "config.urls" TEMPLATES = [ { @@ -97,9 +97,9 @@ }, ] -WSGI_APPLICATION = "SMS.wsgi.application" +WSGI_APPLICATION = "config.wsgi.application" -ASGI_APPLICATION = "SMS.asgi.application" +ASGI_APPLICATION = "config.asgi.application" # Database diff --git a/SMS/urls.py b/config/urls.py similarity index 100% rename from SMS/urls.py rename to config/urls.py diff --git a/SMS/wsgi.py b/config/wsgi.py similarity index 74% rename from SMS/wsgi.py rename to config/wsgi.py index 7160374..1b959f1 100644 --- a/SMS/wsgi.py +++ b/config/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for SMS project. +WSGI config for config project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SMS.settings') +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") application = get_wsgi_application() diff --git a/manage.py b/manage.py index 98279bb..11f573e 100644 --- a/manage.py +++ b/manage.py @@ -4,8 +4,9 @@ import sys import environ + def main(): - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SMS.settings') + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: @@ -17,7 +18,7 @@ def main(): execute_from_command_line(sys.argv) -if __name__ == '__main__': +if __name__ == "__main__": # OS environment variables take precedence over variables from .env environ.Env.read_env() main()