pydev-s6
authorMichael Wagner <michael@wagnertech.de>
Wed, 9 Oct 2024 09:17:23 +0000 (11:17 +0200)
committerMichael Wagner <michael@wagnertech.de>
Wed, 9 Oct 2024 09:17:23 +0000 (11:17 +0200)
python/eh_util/ausweis/views.py
python/eh_util/eh_util/settings.py
python/eh_util/eh_util/templates/.dummy [new file with mode: 0644]
python/eh_util/eh_util/urls.py
python/eh_util/eh_util/views.py [new file with mode: 0644]
python/eh_util/kassenbrief/.dummy [new file with mode: 0644]

index 8d5f300..c796800 100644 (file)
@@ -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,
         }
index ed6eccc..b657787 100644 (file)
@@ -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 (file)
index 0000000..e69de29
index 6ddd3d8..2e9cf81 100644 (file)
@@ -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('<slug:verein>/', views.vbasis),
     path('<slug:verein>/ausweis/', include('ausweis.urls')),
+    path('<slug:verein>/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 (file)
index 0000000..990de52
--- /dev/null
@@ -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 (file)
index 0000000..e69de29