Lint naming conventions
This commit is contained in:
parent
756648b76b
commit
91c1b0717e
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"editor.formatOnSave": true
|
||||||
|
}
|
||||||
13
SMS/asgi.py
13
SMS/asgi.py
@ -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.)
|
|
||||||
})
|
|
||||||
20
accounts/migrations/0015_alter_user_managers.py
Normal file
20
accounts/migrations/0015_alter_user_managers.py
Normal file
@ -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()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
15
config/asgi.py
Normal file
15
config/asgi.py
Normal file
@ -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.)
|
||||||
|
}
|
||||||
|
)
|
||||||
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Django settings for SMS project.
|
Django settings for config project.
|
||||||
|
|
||||||
Generated by 'django-admin startproject' using Django 2.2.3.
|
Generated by 'django-admin startproject' using Django 2.2.3.
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ MIDDLEWARE = [
|
|||||||
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
"django.middleware.clickjacking.XFrameOptionsMiddleware",
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = "SMS.urls"
|
ROOT_URLCONF = "config.urls"
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
@ -97,9 +97,9 @@ TEMPLATES = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
WSGI_APPLICATION = "SMS.wsgi.application"
|
WSGI_APPLICATION = "config.wsgi.application"
|
||||||
|
|
||||||
ASGI_APPLICATION = "SMS.asgi.application"
|
ASGI_APPLICATION = "config.asgi.application"
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
@ -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``.
|
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||||
|
|
||||||
@ -11,6 +11,6 @@ import os
|
|||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
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()
|
application = get_wsgi_application()
|
||||||
@ -4,8 +4,9 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import environ
|
import environ
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SMS.settings')
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings")
|
||||||
try:
|
try:
|
||||||
from django.core.management import execute_from_command_line
|
from django.core.management import execute_from_command_line
|
||||||
except ImportError as exc:
|
except ImportError as exc:
|
||||||
@ -17,7 +18,7 @@ def main():
|
|||||||
execute_from_command_line(sys.argv)
|
execute_from_command_line(sys.argv)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
# OS environment variables take precedence over variables from .env
|
# OS environment variables take precedence over variables from .env
|
||||||
environ.Env.read_env()
|
environ.Env.read_env()
|
||||||
main()
|
main()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user