From c21e0d3292d0b5ded726151899e8bb3cc8b776e4 Mon Sep 17 00:00:00 2001 From: Martin Bley Date: Mon, 2 Oct 2017 18:59:30 +0200 Subject: [PATCH] added new page for admistrative purpose --- .gitignore | 1 + templates/adminpage.html | 62 ++++++++++++++++++++++++++++++++++++++++ templates/nav.html | 3 ++ tipp/models.py | 1 + tipp/openliga.py | 2 ++ tipp/views.py | 28 ++++++++++++++++-- tippy/urls.py | 1 + 7 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 templates/adminpage.html diff --git a/.gitignore b/.gitignore index 3900625..ff84a21 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ static/ templates/blogindex.html-media tippy/static/ warnings.txt +tags diff --git a/templates/adminpage.html b/templates/adminpage.html new file mode 100644 index 0000000..233c711 --- /dev/null +++ b/templates/adminpage.html @@ -0,0 +1,62 @@ +{% extends "base.html" %} +{% load i18n static %} +{% load humanize %} +{% block head %} + +{% endblock %} + +{% block nav %} +{% include "nav.html" with ls=ls season=season %} +{% endblock %} + +{% block body %} +
+
+
+

Aktivierte Ligen

+ + + + + + {% for i in leagues %} + + + + + {% endfor %} +
LigaAbkürzung
{{ i.leagueName }}{{ i.leagueShortcut }}
+
+
+
+
+

Verfügbare Ligen

+ + + + + + + + {% for i in avail_leagues %} + + + + + + + {% endfor %} +
LigaAbkürzungSaisonID
{{ i.leagueName }}{{ i.leagueShortcut }}{{ i.leagueSaison }}{{ i.leagueID }}
+
+
+ {% if debug %} +
+
+ {% for line in debug %} +

{{ line }}

+ {% endfor %} +
+
+ {% endif %} +
+{% endblock %} diff --git a/templates/nav.html b/templates/nav.html index 2fff481..ec4ef7f 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -16,6 +16,9 @@
  • Tipps
  • Bestenliste
  • Blog
  • + {% if user.is_superuser %} +
  • Admin
  • + {% endif %}