From e9595cc3a8c181b79ea9d50d9ea482e3077167e0 Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Wed, 9 Oct 2024 11:17:23 +0200 Subject: [PATCH] pydev-s6 --- python/eh_util/ausweis/views.py | 2 +- python/eh_util/eh_util/settings.py | 3 ++- python/eh_util/eh_util/templates/.dummy | 0 python/eh_util/eh_util/urls.py | 5 +++++ python/eh_util/eh_util/views.py | 14 ++++++++++++++ python/eh_util/kassenbrief/.dummy | 0 6 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 python/eh_util/eh_util/templates/.dummy create mode 100644 python/eh_util/eh_util/views.py create mode 100644 python/eh_util/kassenbrief/.dummy diff --git a/python/eh_util/ausweis/views.py b/python/eh_util/ausweis/views.py index 8d5f300..c796800 100644 --- a/python/eh_util/ausweis/views.py +++ b/python/eh_util/ausweis/views.py @@ -12,7 +12,7 @@ def index(request, verein): vconf = config.getInstance(verein) csv_datei_name = vconf.getConfig("csv_datei_name") if not csv_datei_name: - template = loader.get_template('index.html') + template = loader.get_template('aus_index.html') context = { 'csv_datei_name': csv_datei_name, } diff --git a/python/eh_util/eh_util/settings.py b/python/eh_util/eh_util/settings.py index ed6eccc..b657787 100644 --- a/python/eh_util/eh_util/settings.py +++ b/python/eh_util/eh_util/settings.py @@ -32,6 +32,7 @@ ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'ausweis.apps.AusweisConfig', + 'kassenbrief.apps.KassenbriefConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -55,7 +56,7 @@ ROOT_URLCONF = 'eh_util.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': ["eh_util/templates"], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ diff --git a/python/eh_util/eh_util/templates/.dummy b/python/eh_util/eh_util/templates/.dummy new file mode 100644 index 0000000..e69de29 diff --git a/python/eh_util/eh_util/urls.py b/python/eh_util/eh_util/urls.py index 6ddd3d8..2e9cf81 100644 --- a/python/eh_util/eh_util/urls.py +++ b/python/eh_util/eh_util/urls.py @@ -15,9 +15,14 @@ Including another URLconf """ from django.contrib import admin from django.urls import include, path +import eh_util +from . import views urlpatterns = [ + path('', views.index), path('admin/', admin.site.urls), path('eh-abgleich/', include('eh_abgleich.urls')), + path('/', views.vbasis), path('/ausweis/', include('ausweis.urls')), + path('/kassenbrief/', include('kassenbrief.urls')), ] diff --git a/python/eh_util/eh_util/views.py b/python/eh_util/eh_util/views.py new file mode 100644 index 0000000..990de52 --- /dev/null +++ b/python/eh_util/eh_util/views.py @@ -0,0 +1,14 @@ +from django.http import HttpResponse, HttpResponseRedirect +from django.shortcuts import render +from django.template import loader + + +def index(request): + template = loader.get_template('index.html') + return HttpResponse(template.render({}, request)) + +def vbasis(request, verein): + template = loader.get_template("vbasis.html") + return HttpResponse(template.render({"verein" : verein}, request)) + + \ No newline at end of file diff --git a/python/eh_util/kassenbrief/.dummy b/python/eh_util/kassenbrief/.dummy new file mode 100644 index 0000000..e69de29 -- 2.20.1