Phase 3 Schritt 1: Geräte-Seiten; SQLite für gleichzeitige Zugriffe

Geräte, Schnittstellen, Bridges ohne Admin:
- Liste mit Suche, Filter (Art, Typ, Status, Host) und Sortierung
- Detailseite: Stammdaten, Hinweise, Gäste, Bridges, Schnittstellen
- Formulare mit Auswahl nur erlaubter Werte (Bridges des Hosts,
  Switch-Felder nur am Switch, DSL nur am Router), Felder je Art
- Löschen mit Vorschau; geschützte Abhängigkeiten verhindern Löschen
- URLs über logische IDs, LoginRequiredMiddleware für alle Seiten
- Model: Geraet.hinweise()/hat_verbindung(), GeraetQuerySet,
  loeschvorschau(), numerische IP-Sortierung; Schaubild nutzt
  dieselben Hinweise und verlinkt auf die Detailseiten

Fix "database is locked" bei gleichzeitigem Speichern:
- SQLite: transaction_mode IMMEDIATE, timeout 20 s, WAL-Modus
- Positionen je Anfrage in einer Transaktion
- README: Backup-Hinweis für WAL

84 Tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
H4nSoloandClaude Opus 5.5 committed 2026-11-24 15:13:20 +01:00
1 parent 5877d4a2f3
commit db13019bd7
16 files changed
+894 -33

No files matched your search

+5 -4
View File
@@ -1,4 +1,4 @@
from django.db import models
from django.db import models, transaction
class Position(models.Model):
@@ -25,6 +25,7 @@ class Position(models.Model):
@classmethod
def speichern(cls, positionen):
"""positionen: Liste von {"id": schluessel, "x": float, "y": float}"""
for p in positionen:
cls.objects.update_or_create(schluessel=p["id"], defaults={"x": p["x"], "y": p["y"]})
"""positionen: Liste von {"id": schluessel, "x": float, "y": float} – eine Transaktion je Aufruf."""
with transaction.atomic():
for p in positionen:
cls.objects.update_or_create(schluessel=p["id"], defaults={"x": p["x"], "y": p["y"]})