From 56d6d404f53e9e1d879d5797554c8067091b8a99 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 29 May 2023 02:38:15 +0200 Subject: [PATCH] super basic structure --- gawa/gawa/urls.py | 3 ++- gawa/start/__init__.py | 0 gawa/start/admin.py | 3 +++ gawa/start/apps.py | 6 ++++++ gawa/start/migrations/__init__.py | 0 gawa/start/models.py | 3 +++ gawa/start/tests.py | 3 +++ gawa/start/urls.py | 7 +++++++ gawa/start/views.py | 5 +++++ manage.py | 22 ---------------------- 10 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 gawa/start/__init__.py create mode 100644 gawa/start/admin.py create mode 100644 gawa/start/apps.py create mode 100644 gawa/start/migrations/__init__.py create mode 100644 gawa/start/models.py create mode 100644 gawa/start/tests.py create mode 100644 gawa/start/urls.py create mode 100644 gawa/start/views.py delete mode 100755 manage.py diff --git a/gawa/gawa/urls.py b/gawa/gawa/urls.py index 051f6e6..6171048 100644 --- a/gawa/gawa/urls.py +++ b/gawa/gawa/urls.py @@ -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("", include("start.urls")), path('admin/', admin.site.urls), ] diff --git a/gawa/start/__init__.py b/gawa/start/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gawa/start/admin.py b/gawa/start/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/gawa/start/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/gawa/start/apps.py b/gawa/start/apps.py new file mode 100644 index 0000000..9f48da5 --- /dev/null +++ b/gawa/start/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class StartConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'start' diff --git a/gawa/start/migrations/__init__.py b/gawa/start/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gawa/start/models.py b/gawa/start/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/gawa/start/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/gawa/start/tests.py b/gawa/start/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/gawa/start/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/gawa/start/urls.py b/gawa/start/urls.py new file mode 100644 index 0000000..5119061 --- /dev/null +++ b/gawa/start/urls.py @@ -0,0 +1,7 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path("", views.index, name="index"), +] diff --git a/gawa/start/views.py b/gawa/start/views.py new file mode 100644 index 0000000..76325c4 --- /dev/null +++ b/gawa/start/views.py @@ -0,0 +1,5 @@ +from django.http import HttpResponse + + +def index(request): + return HttpResponse("This is the start of everything") diff --git a/manage.py b/manage.py deleted file mode 100755 index 529599d..0000000 --- a/manage.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -"""Django's command-line utility for administrative tasks.""" -import os -import sys - - -def main(): - """Run administrative tasks.""" - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gawa.settings') - try: - from django.core.management import execute_from_command_line - except ImportError as exc: - raise ImportError( - "Couldn't import Django. Are you sure it's installed and " - "available on your PYTHONPATH environment variable? Did you " - "forget to activate a virtual environment?" - ) from exc - execute_from_command_line(sys.argv) - - -if __name__ == '__main__': - main()