From 99eaafff0019386669bc7be586c0b2ea83e5df06 Mon Sep 17 00:00:00 2001 From: Martin Bley Date: Sun, 2 Apr 2023 21:24:20 +0200 Subject: [PATCH] - getSeason() only for staff members - new view staff() - updated bootstrap to version 3.4.1 - updated jquery to 3.6.3 - changed container layout in main view 'matchday' --- CHANGELOG | 6 ++++++ TipPy/settings.py | 10 --------- requirements.txt | 10 ++++----- templates/base.html | 4 ++-- templates/md.html | 23 ++++++++------------- templates/nav.html | 3 +++ templates/staff.html | 34 ++++++++++++++++++++++++++++++ tipp/models.py | 34 ++++++++++++++++++++---------- tipp/openliga.py | 49 +++++++++++++++++++++----------------------- tipp/urls.py | 1 + tipp/views.py | 31 +++++++++++++++++++--------- 11 files changed, 127 insertions(+), 78 deletions(-) create mode 100644 CHANGELOG create mode 100644 templates/staff.html diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..8a167e3 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,6 @@ +- getSeason() only for staff members +- new view staff() +- updated bootstrap to version 3.4.1 +- updated jquery to 3.6.3 +- changed container layout in main view 'matchday' + diff --git a/TipPy/settings.py b/TipPy/settings.py index 5891453..61333d1 100644 --- a/TipPy/settings.py +++ b/TipPy/settings.py @@ -16,7 +16,6 @@ import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent - # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ @@ -28,9 +27,7 @@ DEBUG = True ALLOWED_HOSTS = [] - # Application definition - INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', @@ -77,7 +74,6 @@ WSGI_APPLICATION = 'TipPy.wsgi.application' # Database # https://docs.djangoproject.com/en/4.0/ref/settings/#databases - DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', @@ -91,7 +87,6 @@ DATABASES = { # Password validation # https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators - AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', @@ -109,13 +104,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/4.0/topics/i18n/ - LANGUAGE_CODE = 'de-de' - TIME_ZONE = 'Europe/Berlin' - USE_I18N = True - USE_TZ = True # Absolute filesystem path to the directory that will hold user-uploaded files. @@ -149,7 +140,6 @@ STATICFILES_DIRS = [ # Default primary key field type # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field - DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' # Redirect on logout diff --git a/requirements.txt b/requirements.txt index feee11e..9ba7e5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -Django~=4.0.6 -psycopg2~=2.9.3 +Django~=4.1.7 +psycopg2~=2.9.5 suds~=1.1.2 -Pillow~=9.2.0 -pytz~=2022.1 -urllib3~=1.26.10 \ No newline at end of file +Pillow~=9.4.0 +pytz~=2023.2 +urllib3~=1.26.15 diff --git a/templates/base.html b/templates/base.html index 8ca4881..6962c64 100644 --- a/templates/base.html +++ b/templates/base.html @@ -36,7 +36,7 @@ - + @@ -53,7 +53,7 @@

- © Martin Bley, 2014-2022 | Dank an + © Martin Bley, 2014-2023 | Dank an OpenLigaDB für die Bereitstellung der Spielergebnisse.
diff --git a/templates/md.html b/templates/md.html index f629996..b37cf85 100644 --- a/templates/md.html +++ b/templates/md.html @@ -12,8 +12,8 @@ {% block body %}
-
-

Deine Tipps

+
+

Deine Tipps

  • Tipps
  • Bestenliste
  • Blog
  • + {% if request.user.is_active and request.user.is_staff %} +
  • Staff
  • + {% endif %}