API-Performance, Anfragebegrenzung, Logging, Suche, eindeutiges Panel
- API /gd/api/v1/folgen/: 5 statt 2.601 Abfragen (2,1 s -> 0,3 s), Ausgabe unverändert; Throttling 60/min pro IP für anonyme Nutzer - IP-Erkennung nach gd/netz.py ausgelagert (Video-Meldung + API) - Logging von Warnungen/Fehlern nach LOG_DIR/django.log (rotierend), in Tests stumm - Suche: mindestens 2 Zeichen, 25 Fragen pro Seite mit Navigation - FolgePanel: UniqueConstraint eine_person_pro_folge (Migration 0011), Prüfung im Intern-Formular, Panel-Auswahl bleibt nach Fehlern erhalten - 12 neue Tests (51 insgesamt), README und Changelog aktualisiert Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1091c90c1e
commit
d4695f43b7
16 files changed
+389
-52
No files matched your search
@@ -104,6 +104,8 @@ So installierst du das Projekt lokal und sauber mit einer Python-Umgebung und ei
|
||||
IMPRESSUM_EMAIL=''
|
||||
# Aufbewahrungsdauer der Server-Logs in Tagen (erscheint in der Datenschutzerklärung)
|
||||
LOG_AUFBEWAHRUNG_TAGE=
|
||||
# Verzeichnis für Django-Logs; außerhalb des Webroots ablegen (Standard: logs/ im Projekt)
|
||||
LOG_DIR=
|
||||
```
|
||||
Wichtig: Die Werte müssen zur eigenen Umgebung passen. Die Datei wird automatisch per `python-dotenv` geladen. Der Entwicklungsserver lädt bei Änderungen an der `.env` automatisch neu.
|
||||
5. Datenbank migrieren
|
||||
@@ -136,6 +138,8 @@ python manage.py test gd intern
|
||||
```
|
||||
* **Externe Inhalte:** Bootstrap, Bootstrap Icons, Chart.js und Montserrat liegen unter `assets/vendor/`. Die einzige externe Verbindung ist YouTube, und die wird erst nach Einwilligung über den Cookie-Banner oder per Klick auf „Video laden“ aufgebaut.
|
||||
* **Impressum & Datenschutzerklärung:** `/gd/impressum/` und `/gd/datenschutz/`. Die persönlichen Angaben kommen aus der `.env` und landen nicht im Repository.
|
||||
* **Logs:** Warnungen und Fehler (inkl. Fehler 500 mit Traceback) landen in `LOG_DIR/django.log` (rotierend, 5 × 5 MB).
|
||||
* **API:** Nicht angemeldete Nutzer dürfen 60 Anfragen pro Minute und IP stellen.
|
||||
|
||||
### ⚠️ Disclaimer
|
||||
Dieses Projekt ist ein rein privates Fan-Projekt und dient Archiv- sowie statistischen Zwecken.
|
||||
@@ -247,6 +251,8 @@ Follow these steps to install the project locally in a clean Python environment
|
||||
IMPRESSUM_EMAIL=''
|
||||
# Server log retention in days (shown in the privacy policy)
|
||||
LOG_AUFBEWAHRUNG_TAGE=
|
||||
# Directory for Django logs; keep it outside the web root (default: logs/ in the project)
|
||||
LOG_DIR=
|
||||
```
|
||||
These values are loaded automatically via `python-dotenv`. The development server reloads automatically when `.env` changes.
|
||||
5. Apply database migrations
|
||||
@@ -279,6 +285,8 @@ python manage.py test gd intern
|
||||
```
|
||||
* **External content:** Bootstrap, Bootstrap Icons, Chart.js, and Montserrat are located in `assets/vendor/`. The only external connection is YouTube, which is established only after consent via the cookie banner or a click on "Video laden".
|
||||
* **Legal notice & privacy policy:** `/gd/impressum/` and `/gd/datenschutz/`. Personal details come from `.env` and are not stored in the repository.
|
||||
* **Logs:** Warnings and errors (including HTTP 500 with traceback) are written to `LOG_DIR/django.log` (rotating, 5 × 5 MB).
|
||||
* **API:** Anonymous users are limited to 60 requests per minute per IP.
|
||||
|
||||
### ⚠️ Disclaimer
|
||||
This project is a purely private fan project for archival and statistical purposes.
|
||||
|
||||
Reference in new issue
Block a user