diff --git a/chartacapsa/config/urls.py b/chartacapsa/config/urls.py index a562bbd..ecf1368 100644 --- a/chartacapsa/config/urls.py +++ b/chartacapsa/config/urls.py @@ -1,22 +1,13 @@ -""" -URL configuration for chartacapsa project. - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/6.0/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" from django.contrib import admin -from django.urls import path +from django.urls import path, include +from django.conf import settings +from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), + path('', include('gebiete.urls')), # Dashboard auf der Startseite ] + +# Wichtig für statische Dateien und GeoJSON im Debug-Modus +if settings.DEBUG: + urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) diff --git a/chartacapsa/gebiete/static/data/beta_gebiet.geojson b/chartacapsa/gebiete/static/data/beta_gebiet.geojson new file mode 100644 index 0000000..143eb7c --- /dev/null +++ b/chartacapsa/gebiete/static/data/beta_gebiet.geojson @@ -0,0 +1,273 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "coordinates": [ + [ + [ + 8.786209, + 50.794333 + ], + [ + 8.787689, + 50.795065 + ], + [ + 8.787196, + 50.795323 + ], + [ + 8.786616, + 50.795262 + ], + [ + 8.78594, + 50.795085 + ], + [ + 8.784803, + 50.794841 + ], + [ + 8.783945, + 50.794733 + ], + [ + 8.783548, + 50.794638 + ], + [ + 8.783162, + 50.794489 + ], + [ + 8.782936, + 50.794251 + ], + [ + 8.782657, + 50.793593 + ], + [ + 8.782572, + 50.793275 + ], + [ + 8.783237, + 50.793193 + ], + [ + 8.783741, + 50.793247 + ], + [ + 8.783934, + 50.793153 + ], + [ + 8.784106, + 50.793064 + ], + [ + 8.784471, + 50.793119 + ], + [ + 8.784932, + 50.793288 + ], + [ + 8.785307, + 50.793498 + ], + [ + 8.785876, + 50.794055 + ], + [ + 8.786209, + 50.794333 + ] + ] + ], + "type": "Polygon" + }, + "properties": { + "name": "Richtsberg 2", + "id": 2 + }, + "id": "66bk4" + }, + { + "type": "Feature", + "geometry": { + "coordinates": [ + [ + [ + 8.785018, + 50.793295 + ], + [ + 8.78549, + 50.793634 + ], + [ + 8.787496, + 50.793119 + ], + [ + 8.786756, + 50.79303 + ], + [ + 8.786584, + 50.79244 + ], + [ + 8.787045, + 50.791837 + ], + [ + 8.786756, + 50.791498 + ], + [ + 8.783698, + 50.789653 + ], + [ + 8.783001, + 50.790196 + ], + [ + 8.783913, + 50.79067 + ], + [ + 8.784438, + 50.791335 + ], + [ + 8.783247, + 50.790528 + ], + [ + 8.78284, + 50.790575 + ], + [ + 8.781831, + 50.79044 + ], + [ + 8.780737, + 50.790813 + ], + [ + 8.780318, + 50.792508 + ], + [ + 8.782593, + 50.793241 + ], + [ + 8.783709, + 50.793227 + ], + [ + 8.784385, + 50.793051 + ], + [ + 8.78476, + 50.793207 + ], + [ + 8.784889, + 50.793241 + ], + [ + 8.785018, + 50.793295 + ] + ] + ], + "type": "Polygon" + }, + "properties": { + "name": "Richtsberg 3" + }, + "id": "ZdDc0" + }, + { + "type": "Feature", + "geometry": { + "coordinates": [ + [ + [ + 8.789207, + 50.795072 + ], + [ + 8.788832, + 50.795329 + ], + [ + 8.787362, + 50.794895 + ], + [ + 8.786193, + 50.794326 + ], + [ + 8.785495, + 50.793695 + ], + [ + 8.786654, + 50.793275 + ], + [ + 8.787566, + 50.793152 + ], + [ + 8.788617, + 50.793593 + ], + [ + 8.789282, + 50.794109 + ], + [ + 8.789358, + 50.7944 + ], + [ + 8.789883, + 50.794692 + ], + [ + 8.789926, + 50.794902 + ], + [ + 8.789207, + 50.795072 + ] + ] + ], + "type": "Polygon" + }, + "properties": { + "name": "Richtsberg-1", + "id": 3 + }, + "id": "kLn2l" + } + ] +} \ No newline at end of file diff --git a/chartacapsa/gebiete/static/data/card.geojson b/chartacapsa/gebiete/static/data/card.geojson new file mode 120000 index 0000000..632d400 --- /dev/null +++ b/chartacapsa/gebiete/static/data/card.geojson @@ -0,0 +1 @@ +./beta_gebiet.geojson \ No newline at end of file diff --git a/chartacapsa/gebiete/templates/gebiete/dashboard.html b/chartacapsa/gebiete/templates/gebiete/dashboard.html new file mode 100644 index 0000000..c4c0d04 --- /dev/null +++ b/chartacapsa/gebiete/templates/gebiete/dashboard.html @@ -0,0 +1,63 @@ + + + + + 🗃️ KartenKiste - Dashboard + + + + + + + + +
+

🗺️ Gebietsübersicht

+ +
+
+ + + + diff --git a/chartacapsa/gebiete/urls.py b/chartacapsa/gebiete/urls.py new file mode 100644 index 0000000..867c7b8 --- /dev/null +++ b/chartacapsa/gebiete/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from . import views + +app_name = 'gebiete' + +urlpatterns = [ + path('', views.dashboard, name='dashboard'), +] diff --git a/chartacapsa/gebiete/views.py b/chartacapsa/gebiete/views.py index 91ea44a..d6add36 100644 --- a/chartacapsa/gebiete/views.py +++ b/chartacapsa/gebiete/views.py @@ -1,3 +1,7 @@ from django.shortcuts import render # Create your views here. +from django.shortcuts import render + +def dashboard(request): + return render(request, 'gebiete/dashboard.html')