Compare commits
No commits in common. '3dfebfb50cf1e116cc0446fd56e77d5ff6ba1317' and '1c383dd9735d8360bb0ecfae25dbd04004f3d3be' have entirely different histories.
3dfebfb50c
...
1c383dd973
@ -1,44 +0,0 @@
|
||||
# Generated by Django 6.0.6 on 2026-06-09 22:31
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Person',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100, verbose_name='Name')),
|
||||
('telefon', models.CharField(blank=True, max_length=20, verbose_name='Telefonnummer')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Person',
|
||||
'verbose_name_plural': 'Personen',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Gebiet',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('nummer', models.IntegerField(unique=True, verbose_name='Gebiets-Nummer')),
|
||||
('name', models.CharField(max_length=150, verbose_name='Name/Bezeichnung')),
|
||||
('beschreibung', models.TextField(blank=True, verbose_name='Beschreibung/Notizen')),
|
||||
('zuletzt_bearbeitet', models.DateField(blank=True, null=True, verbose_name='Zuletzt bearbeitet')),
|
||||
('karte', models.ImageField(blank=True, upload_to='gebietskarten/', verbose_name='Gebietskarte (Bild)')),
|
||||
('aktuell_vergeben_an', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='gebiete', to='gebiete.person', verbose_name='Aktuell vergeben an')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Gebiet',
|
||||
'verbose_name_plural': 'Gebiete',
|
||||
'ordering': ['nummer'],
|
||||
},
|
||||
),
|
||||
]
|
||||
@ -1,273 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1 +0,0 @@
|
||||
./beta_gebiet.geojson
|
||||
|
Before Width: | Height: | Size: 11 KiB |
@ -1,63 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>🗃️ KartenKiste - Dashboard</title>
|
||||
<!-- Leaflet CSS & JS einbinden -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
||||
|
||||
|
||||
<style>
|
||||
body { font-family: sans-serif; background: #F4F7F6; margin: 0; padding: 20px; }
|
||||
#map { height: 500px; width: 100%; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
|
||||
.container { max-width: 1200px; margin: 0 auto; }
|
||||
h1 { color: #2C3E50; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>🗺️ Gebietsübersicht</h1>
|
||||
<!-- Hier wird die Karte gerendert -->
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 1. Karte initialisieren und auf Deutschland/Ihre Region zentrieren
|
||||
// (Koordinaten [Breitengrad, Längengrad], Zoomstufe)
|
||||
const map = L.map('map').setView([51.1657, 10.4515], 6);
|
||||
|
||||
// 2. OpenStreetMap Kacheln hinzufügen (Clean & Modern Layout)
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
}).addTo(map);
|
||||
|
||||
// 3. GeoJSON-Daten aus dem Django Static-Ordner laden
|
||||
fetch('/static/data/card.geojson')
|
||||
.then(response => response.json())
|
||||
.then(geoJsonData => {
|
||||
// GeoJSON zur Karte hinzufügen mit Styling
|
||||
const geoJsonLayer = L.geoJSON(geoJsonData, {
|
||||
style: function(feature) {
|
||||
return {
|
||||
color: '#A8C3B6', /* Unser Salbeigrün als Grenze */
|
||||
weight: 2,
|
||||
fillColor: '#D0E7DE', /* Unser Soft-Mint als Fläche */
|
||||
fillOpacity: 0.5
|
||||
};
|
||||
},
|
||||
onEachFeature: function(feature, layer) {
|
||||
// Popup-Inhalt beim Klick auf ein Gebiet
|
||||
// Ersetzt 'name' mit dem Feldnamen aus Ihrer uMap-Eigenschaft
|
||||
const gebietName = feature.properties.name || "Unbekanntes Gebiet";
|
||||
layer.bindPopup(`<strong>Gebiet:</strong> ${gebietName}`);
|
||||
}
|
||||
}).addTo(map);
|
||||
|
||||
// Karte automatisch so zoomen, dass alle Gebiete sichtbar sind
|
||||
map.fitBounds(geoJsonLayer.getBounds());
|
||||
})
|
||||
.catch(error => console.error('Fehler beim Laden der GeoJSON:', error));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,8 +0,0 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
app_name = 'gebiete'
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.dashboard, name='dashboard'),
|
||||
]
|
||||
@ -1,5 +0,0 @@
|
||||
asgiref==3.11.1
|
||||
Django==6.0.6
|
||||
django-jazzmin==3.0.4
|
||||
pillow==12.2.0
|
||||
sqlparse==0.5.5
|
||||
Loading…
Reference in new issue