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:
H4nSoloandClaude Opus 5.5 committed 2026-10-22 23:32:04 +02:00
1 parent 1091c90c1e
commit d4695f43b7
16 files changed
+389 -52

No files matched your search

+1
View File
@@ -47,6 +47,7 @@
placeholder="Suche..."
aria-label="Search"
value="{{ query|default:'' }}"
minlength="2"
required>
<datalist id="teamOptions">
+41 -1
View File
@@ -18,7 +18,7 @@
{% endif %}
</h2>
<p class="text-muted mb-0">
Insgesamt {{ team.count|add:fragen_count }} Treffer gefunden.
Insgesamt {{ team|length|add:fragen_count }} Treffer gefunden.
</p>
</div>
@@ -46,6 +46,13 @@
<hr class="mb-5">
{% if query_zu_kurz %}
<div class="alert alert-warning">
<i class="bi bi-info-circle-fill me-1"></i>
Bitte gib mindestens {{ min_zeichen }} Zeichen ein, damit die Suche sinnvolle Ergebnisse liefert.
</div>
{% endif %}
<div class="row">
{% if team %}
<div class="col-12 mb-5">
@@ -111,6 +118,39 @@
</div>
{% endfor %}
</div>
{% if seite.has_other_pages %}
<nav aria-label="Seiten der Suchergebnisse" class="mt-4">
<p class="text-center text-muted small mb-2">
Fragen {{ seite.start_index }}–{{ seite.end_index }} von {{ fragen_count }}
</p>
<ul class="pagination justify-content-center flex-wrap">
{% if seite.has_previous %}
<li class="page-item">
<a class="page-link" href="?q={{ query|urlencode }}{% if jahr_auswahl %}&amp;jahr={{ jahr_auswahl }}{% endif %}&amp;seite={{ seite.previous_page_number }}">&laquo; Zurück</a>
</li>
{% endif %}
{% for nummer in seite.paginator.get_elided_page_range %}
{% if nummer == seite.paginator.ELLIPSIS %}
<li class="page-item disabled"><span class="page-link">…</span></li>
{% elif nummer == seite.number %}
<li class="page-item active" aria-current="page"><span class="page-link">{{ nummer }}</span></li>
{% else %}
<li class="page-item">
<a class="page-link" href="?q={{ query|urlencode }}{% if jahr_auswahl %}&amp;jahr={{ jahr_auswahl }}{% endif %}&amp;seite={{ nummer }}">{{ nummer }}</a>
</li>
{% endif %}
{% endfor %}
{% if seite.has_next %}
<li class="page-item">
<a class="page-link" href="?q={{ query|urlencode }}{% if jahr_auswahl %}&amp;jahr={{ jahr_auswahl }}{% endif %}&amp;seite={{ seite.next_page_number }}">Weiter &raquo;</a>
</li>
{% endif %}
</ul>
</nav>
{% endif %}
{% elif query_zu_kurz %}
<p class="text-muted">Keine Suche durchgeführt.</p>
{% else %}
<div class="text-center py-5">
<i class="bi bi-search text-muted display-1"></i>