From 6899b9b9f3c38a22bf410daac51f5bfab49e3c28 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 21 Apr 2023 21:29:21 +0200 Subject: [PATCH] Merge 'redirects' app into 'pages' --- requirements.txt | 7 ++--- shiftregister/metrics/urls.py | 2 +- shiftregister/pages/admin.py | 5 ++-- .../pages/default_content/about.html | 1 + shiftregister/pages/default_content/faq.html | 1 + shiftregister/pages/default_content/map.html | 1 + .../pages/management/commands/importhtml.py | 13 +++++++--- .../0002_page_kind_alter_page_title.py | 26 +++++++++++++++++++ shiftregister/pages/models.py | 16 ++++++++++-- shiftregister/pages/templates/page.html | 4 +-- shiftregister/pages/views.py | 23 ++++++++++++++-- shiftregister/redirects/__init__.py | 0 shiftregister/redirects/admin.py | 6 ----- shiftregister/redirects/apps.py | 6 ----- .../redirects/migrations/0001_initial.py | 20 -------------- .../redirects/migrations/__init__.py | 0 shiftregister/redirects/models.py | 11 -------- shiftregister/redirects/tests.py | 3 --- shiftregister/redirects/urls.py | 8 ------ shiftregister/redirects/views.py | 9 ------- shiftregister/settings.py | 1 - shiftregister/signage/urls.py | 8 +++--- shiftregister/urls.py | 7 +++-- 23 files changed, 90 insertions(+), 88 deletions(-) create mode 100644 shiftregister/pages/migrations/0002_page_kind_alter_page_title.py delete mode 100644 shiftregister/redirects/__init__.py delete mode 100644 shiftregister/redirects/admin.py delete mode 100644 shiftregister/redirects/apps.py delete mode 100644 shiftregister/redirects/migrations/0001_initial.py delete mode 100644 shiftregister/redirects/migrations/__init__.py delete mode 100644 shiftregister/redirects/models.py delete mode 100644 shiftregister/redirects/tests.py delete mode 100644 shiftregister/redirects/urls.py delete mode 100644 shiftregister/redirects/views.py diff --git a/requirements.txt b/requirements.txt index 263947a..bc37368 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ -## The following requirements were added by pip freeze: amqp==5.1.1 asgiref==3.5.0 async-timeout==4.0.2 +beautifulsoup4==4.12.2 billiard==3.6.4.0 celery==5.2.6 certifi==2021.10.8 @@ -12,14 +12,14 @@ click-plugins==1.1.1 click-repl==0.2.0 Deprecated==1.2.13 Django==4.0.4 -git+https://github.com/kikeh/django-dynamic-preferences@375f1a54dba91f81880a86f4a44bc2c42ceab067#egg=django-dynamic-preferences +django-dynamic-preferences==1.15.0 django-phonenumber-field==6.1.0 icalendar==4.0.9 idna==3.3 kombu==5.2.4 librabbitmq==2.0.0 packaging==21.3 -persisting-theory==0.2.1 +persisting-theory==1.0 phonenumbers==8.12.47 prompt-toolkit==3.0.29 psycopg2-binary==2.9.3 @@ -30,6 +30,7 @@ redis==4.2.2 requests==2.27.1 sentry-sdk==1.5.10 six==1.16.0 +soupsieve==2.4.1 sqlparse==0.4.2 urllib3==1.26.9 vine==5.0.0 diff --git a/shiftregister/metrics/urls.py b/shiftregister/metrics/urls.py index 30dff2f..2be3bce 100644 --- a/shiftregister/metrics/urls.py +++ b/shiftregister/metrics/urls.py @@ -3,5 +3,5 @@ from django.urls import path from . import views urlpatterns = [ - path("", views.metrics, name="metrics"), + path("metrics", views.metrics, name="metrics"), ] diff --git a/shiftregister/pages/admin.py b/shiftregister/pages/admin.py index 3f24906..24b829a 100644 --- a/shiftregister/pages/admin.py +++ b/shiftregister/pages/admin.py @@ -13,7 +13,6 @@ def reimport(modeladmin, request, queryset): @admin.register(Page) class PageAdmin(admin.ModelAdmin): - readonly_fields = ("url",) - fields = ("url", "content", "title", "visible") - list_display = ("title", "url", "visible") + fields = ("url", "content", "title", "visible", "kind") + list_display = ("url", "title", "visible", "kind") actions = (reimport,) diff --git a/shiftregister/pages/default_content/about.html b/shiftregister/pages/default_content/about.html index 095b910..3c3b271 100644 --- a/shiftregister/pages/default_content/about.html +++ b/shiftregister/pages/default_content/about.html @@ -1,3 +1,4 @@ +Über diese Seite/Impressum
Wir speichern die folgenden Daten, wenn du dich bei uns registrierst: