2
0
Fork 0

start new team app, add project wide template dir

This commit is contained in:
Andreas (@xAndy) Zimmermann 2022-04-13 16:25:47 +02:00
parent aa8d4e2db4
commit bfcbe09965
11 changed files with 30 additions and 1 deletions

View File

@ -32,6 +32,7 @@ ALLOWED_HOSTS = []
INSTALLED_APPS = [ INSTALLED_APPS = [
'shiftregister.app.apps.AppConfig', 'shiftregister.app.apps.AppConfig',
'shiftregister.team.apps.TeamConfig',
'django.contrib.admin', 'django.contrib.admin',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
@ -55,7 +56,7 @@ ROOT_URLCONF = 'shiftregister.urls'
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': [Path(BASE_DIR,Path("templates"))],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'context_processors': [ 'context_processors': [

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 TeamConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'shiftregister.team'

View File

@ -0,0 +1,3 @@
from django.db import models
from shiftregister.app.models import *
# 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,5 @@
from django.shortcuts import render
# Create your views here.
def index(request):
pass

View File

@ -18,5 +18,6 @@ from django.urls import include, path
urlpatterns = [ urlpatterns = [
path('', include('shiftregister.app.urls')), path('', include('shiftregister.app.urls')),
path('team/', include('shiftregister.team.urls')),
path('admin/', admin.site.urls), path('admin/', admin.site.urls),
] ]