fix: configure CI database connection properly

- Add dotenv loading to Django settings
- Update CI workflow to use correct environment variables
- Set POSTGRES_* variables instead of DATABASE_URL
- Add environment variables to all Django management commands
- Fixes CI test failures due to database connection issues
This commit is contained in:
Stiftung Development
2025-09-06 18:47:23 +02:00
parent dcc91b9f49
commit 35ba089a84
64 changed files with 7040 additions and 1419 deletions

View File

@@ -15,30 +15,6 @@
<!-- Statistics Cards -->
<div class="row mb-4">
<!-- Person Statistics -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-primary shadow h-100 py-2">
<div class="card-body">
<div class="row no-gutters align-items-center">
<div class="col mr-2">
<div class="text-xs font-weight-bold text-primary text-uppercase mb-1">
Personen
</div>
<div class="h5 mb-0 font-weight-bold text-gray-800">
{{ total_persons }}
</div>
<div class="text-xs text-muted">
{{ active_persons }} aktiv
</div>
</div>
<div class="col-auto">
<i class="fas fa-users fa-2x text-gray-300"></i>
</div>
</div>
</div>
</div>
</div>
<!-- Land Statistics -->
<div class="col-xl-3 col-md-6 mb-4">
<div class="card border-left-success shadow h-100 py-2">
@@ -129,12 +105,7 @@
<span>Neue Förderung</span>
</a>
</div>
<div class="col-md-3 mb-3">
<a href="{% url 'stiftung:verpachtung_create' %}" class="btn btn-outline-success w-100 h-100 d-flex flex-column align-items-center justify-content-center p-3">
<i class="fas fa-handshake fa-2x mb-2"></i>
<span>Neue Verpachtung</span>
</a>
</div>
<!-- Removed generic "Neue Verpachtung" - now created via specific Land pages -->
<div class="col-md-3 mb-3">
<a href="{% url 'stiftung:bericht_list' %}" class="btn btn-outline-info w-100 h-100 d-flex flex-column align-items-center justify-content-center p-3">
<i class="fas fa-chart-bar fa-2x mb-2"></i>
@@ -364,15 +335,15 @@
€{{ verpachtung.pachtzins_jaehrlich|floatformat:0 }}/Jahr
</small>
</div>
<a href="{% url 'stiftung:verpachtung_detail' verpachtung.pk %}" class="btn btn-sm btn-outline-primary">
<a href="{% url 'stiftung:land_verpachtung_detail' verpachtung.pk %}" class="btn btn-sm btn-outline-primary">
<i class="fas fa-eye"></i>
</a>
</div>
{% endfor %}
</div>
<div class="text-center mt-3">
<a href="{% url 'stiftung:verpachtung_list' %}" class="btn btn-sm btn-primary">
Alle Verpachtungen anzeigen
<a href="{% url 'stiftung:land_list' %}" class="btn btn-sm btn-primary">
Ländereien verwalten
</a>
</div>
{% else %}