fixes with rewrite

This commit is contained in:
Pratyush Desai 2022-09-03 05:25:15 +05:30
parent b2a9fdaa79
commit 8eeaf4a1ca
Signed by: pratyush
GPG Key ID: DBA5BB7505946FAD
16 changed files with 46 additions and 12 deletions

2
.gitignore vendored
View File

@ -1 +1,3 @@
env/
.vscode
__pycache__

View File

@ -1,5 +1,5 @@
"""
ASGI config for lcadmin project.
ASGI config for LCAdmin project.
It exposes the ASGI callable as a module-level variable named ``application``.
@ -11,6 +11,6 @@ import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lcadmin.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "LCAdmin.settings")
application = get_asgi_application()

View File

@ -1,5 +1,5 @@
"""
Django settings for lcadmin project.
Django settings for LCAdmin project.
Generated by 'django-admin startproject' using Django 4.1.
@ -20,7 +20,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-wqx6vg_frwq$$u)-a+$%y5fjj4w=kt#vltgoq6-2fpu7*v#1+$"
SECRET_KEY = "django-insecure-4r+ddh7a)1c%vdlhr)j8!n@_ud3&*03xo+ad+nm3p-4ntx3#@+"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
"scheduler.apps.SchedulerConfig",
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
@ -49,7 +50,7 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "lcadmin.urls"
ROOT_URLCONF = "LCAdmin.urls"
TEMPLATES = [
{
@ -67,7 +68,7 @@ TEMPLATES = [
},
]
WSGI_APPLICATION = "lcadmin.wsgi.application"
WSGI_APPLICATION = "LCAdmin.wsgi.application"
# Database

View File

@ -1,4 +1,4 @@
"""lcadmin URL Configuration
"""LCAdmin URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import include, path
urlpatterns = [
path("admin/", admin.site.urls),
path('scheduler/', include('scheduler.urls')),
path('admin/', admin.site.urls),
]

View File

@ -1,5 +1,5 @@
"""
WSGI config for lcadmin project.
WSGI config for LCAdmin project.
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
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lcadmin.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "LCAdmin.settings")
application = get_wsgi_application()

BIN
LCAdmin/db.sqlite3 Normal file

Binary file not shown.

View File

@ -6,7 +6,7 @@ import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lcadmin.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "LCAdmin.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:

View File

View File

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class SchedulerConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "scheduler"

View File

View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,7 @@
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]

View File

@ -0,0 +1,8 @@
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the polls index.")