Phase 0: Django-Grundgerüst, Docker und Konzept v0.2

- Django 5.2 LTS mit Apps inventar, topologie, export, scanner
- Konfiguration über .env (Vorlage .env.example), SQLite in data/
- Login und geschützte Startseite mit Bootstrap 5 (lokal)
- Dockerfile, docker-compose.yml, Entrypoint (migrate, collectstatic)
- README/AUFBAUPLAN: offene Punkte 1, 2, 4, 7 geklärt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
H4nSoloandClaude Opus 5.5 committed 2026-11-24 10:41:15 +01:00
1 parent 4473523aab
commit 15b6ba2bde
46 files changed
+507 -15

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
{% load static %}<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Netzwerk Planer{% endblock %}</title>
<link rel="stylesheet" href="{% static 'vendor/bootstrap/bootstrap.min.css' %}">
</head>
<body class="bg-body-tertiary">
<nav class="navbar navbar-expand bg-dark" data-bs-theme="dark">
<div class="container">
<a class="navbar-brand" href="{% url 'start' %}">Netzwerk Planer</a>
{% if user.is_authenticated %}
<div class="navbar-nav ms-auto align-items-center">
<a class="nav-link" href="{% url 'admin:index' %}">Admin</a>
<form method="post" action="{% url 'logout' %}" class="ms-2">
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-outline-light">Abmelden ({{ user.username }})</button>
</form>
</div>
{% endif %}
</div>
</nav>
<main class="container py-4">
{% block content %}{% endblock %}
</main>
<script src="{% static 'vendor/bootstrap/bootstrap.bundle.min.js' %}"></script>
</body>
</html>
+31
View File
@@ -0,0 +1,31 @@
{% extends "base.html" %}
{% block title %}Anmelden – Netzwerk Planer{% endblock %}
{% block content %}
<div class="row justify-content-center">
<div class="col-sm-8 col-md-5 col-lg-4">
<div class="card shadow-sm">
<div class="card-body">
<h1 class="h4 mb-3">Anmelden</h1>
{% if form.errors %}
<div class="alert alert-danger py-2">Benutzername oder Passwort falsch.</div>
{% endif %}
<form method="post">
{% csrf_token %}
<div class="mb-3">
<label class="form-label" for="id_username">Benutzername</label>
<input class="form-control" type="text" name="username" id="id_username" autofocus required>
</div>
<div class="mb-3">
<label class="form-label" for="id_password">Passwort</label>
<input class="form-control" type="password" name="password" id="id_password" required>
</div>
<input type="hidden" name="next" value="{{ next }}">
<button type="submit" class="btn btn-primary w-100">Anmelden</button>
</form>
</div>
</div>
</div>
</div>
{% endblock %}