From f565f2437be7550c3dcd6e827982839c7b76da00 Mon Sep 17 00:00:00 2001 From: Pratyush Desai Date: Fri, 9 Sep 2022 07:50:35 +0530 Subject: [PATCH] polls --- LCAdmin/LCAdmin/settings.py | 1 + LCAdmin/LCAdmin/urls.py | 1 + LCAdmin/polls/__init__.py | 0 LCAdmin/polls/admin.py | 3 +++ LCAdmin/polls/apps.py | 6 ++++++ LCAdmin/polls/migrations/__init__.py | 0 LCAdmin/polls/models.py | 3 +++ LCAdmin/polls/tests.py | 3 +++ LCAdmin/polls/urls.py | 7 +++++++ LCAdmin/polls/views.py | 8 ++++++++ LCAdmin/scheduler/views.py | 2 +- 11 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 LCAdmin/polls/__init__.py create mode 100644 LCAdmin/polls/admin.py create mode 100644 LCAdmin/polls/apps.py create mode 100644 LCAdmin/polls/migrations/__init__.py create mode 100644 LCAdmin/polls/models.py create mode 100644 LCAdmin/polls/tests.py create mode 100644 LCAdmin/polls/urls.py create mode 100644 LCAdmin/polls/views.py diff --git a/LCAdmin/LCAdmin/settings.py b/LCAdmin/LCAdmin/settings.py index e422abc..1670e30 100644 --- a/LCAdmin/LCAdmin/settings.py +++ b/LCAdmin/LCAdmin/settings.py @@ -32,6 +32,7 @@ ALLOWED_HOSTS = [] INSTALLED_APPS = [ "scheduler.apps.SchedulerConfig", + "polls.apps.PollsConfig", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", diff --git a/LCAdmin/LCAdmin/urls.py b/LCAdmin/LCAdmin/urls.py index 8cabc19..35604fe 100644 --- a/LCAdmin/LCAdmin/urls.py +++ b/LCAdmin/LCAdmin/urls.py @@ -18,5 +18,6 @@ from django.urls import include, path urlpatterns = [ path('scheduler/', include('scheduler.urls')), + path('polls/', include("polls.urls")), path('admin/', admin.site.urls), ] diff --git a/LCAdmin/polls/__init__.py b/LCAdmin/polls/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/LCAdmin/polls/admin.py b/LCAdmin/polls/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/LCAdmin/polls/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/LCAdmin/polls/apps.py b/LCAdmin/polls/apps.py new file mode 100644 index 0000000..5184937 --- /dev/null +++ b/LCAdmin/polls/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class PollsConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "polls" diff --git a/LCAdmin/polls/migrations/__init__.py b/LCAdmin/polls/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/LCAdmin/polls/models.py b/LCAdmin/polls/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/LCAdmin/polls/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/LCAdmin/polls/tests.py b/LCAdmin/polls/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/LCAdmin/polls/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/LCAdmin/polls/urls.py b/LCAdmin/polls/urls.py new file mode 100644 index 0000000..3ef24d9 --- /dev/null +++ b/LCAdmin/polls/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='index'), +] \ No newline at end of file diff --git a/LCAdmin/polls/views.py b/LCAdmin/polls/views.py new file mode 100644 index 0000000..363c279 --- /dev/null +++ b/LCAdmin/polls/views.py @@ -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.") \ No newline at end of file diff --git a/LCAdmin/scheduler/views.py b/LCAdmin/scheduler/views.py index 363c279..d143819 100644 --- a/LCAdmin/scheduler/views.py +++ b/LCAdmin/scheduler/views.py @@ -5,4 +5,4 @@ from django.http import HttpResponse def index(request): - return HttpResponse("Hello, world. You're at the polls index.") \ No newline at end of file + return HttpResponse("Hello, world. You're at the Scheduler index.") \ No newline at end of file