Add examples app

This commit is contained in:
Andreas Zweili 2023-07-24 14:36:01 +02:00
parent bc88861db3
commit 1d824b7555
9 changed files with 29 additions and 0 deletions

0
src/examples/__init__.py Normal file
View File

3
src/examples/admin.py Normal file
View File

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

6
src/examples/apps.py Normal file
View File

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

View File

3
src/examples/models.py Normal file
View File

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

3
src/examples/tests.py Normal file
View File

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

7
src/examples/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
src/examples/views.py Normal file
View File

@ -0,0 +1,5 @@
from django.http import HttpResponse
def index(request) -> HttpResponse:
return HttpResponse("Base view")

View File

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