super basic structure

This commit is contained in:
Christoph J. Scherr 2023-05-29 02:38:15 +02:00
parent ac64db4512
commit 56d6d404f5
Signed by: PlexSheep
GPG Key ID: 25B4ACF7D88186CC
10 changed files with 29 additions and 23 deletions

View File

@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
""" """
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import include, path
urlpatterns = [ urlpatterns = [
path("", include("start.urls")),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
] ]

0
gawa/start/__init__.py Normal file
View File

3
gawa/start/admin.py Normal file
View File

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

6
gawa/start/apps.py Normal file
View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class StartConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'start'

View File

3
gawa/start/models.py Normal file
View File

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

3
gawa/start/tests.py Normal file
View File

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

7
gawa/start/urls.py Normal file
View File

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

5
gawa/start/views.py Normal file
View File

@ -0,0 +1,5 @@
from django.http import HttpResponse
def index(request):
return HttpResponse("This is the start of everything")

View File

@ -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()