From 47ff1192b4885c7dbc2747c6b26064a88104bd2b Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Mon, 25 Jul 2022 16:43:30 +0200 Subject: [PATCH] Apply comments / recommendations of pullrequest --- .gitignore | 1 - docs/heroku-backup.md | 6 +++--- server/books/models/topic.py | 10 ---------- .../templates/wagtailadmin/books/topic/index.html | 13 ------------- .../templates/wagtailadmin/pages/listing/_list.html | 3 +++ 5 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 server/core/templates/wagtailadmin/books/topic/index.html diff --git a/.gitignore b/.gitignore index f8086211..c722f0b5 100644 --- a/.gitignore +++ b/.gitignore @@ -47,5 +47,4 @@ server/media/ # test reports client/cypress/test-reports/ server/test-reports/ -*.dump .direnv diff --git a/docs/heroku-backup.md b/docs/heroku-backup.md index a820d0bb..5469d5dc 100644 --- a/docs/heroku-backup.md +++ b/docs/heroku-backup.md @@ -29,14 +29,14 @@ To download a backup use ### Load a backup locally Be careful since you download user data as well. Therefore use preprod app by -default, it is anonimized. And more or less in sync with the prod app. +default, it is anonymized. -Downlaoad backup +####Download backup `heroku pg:backups:download --app ` -Load dump file into your db +####Load dump file into your db To download a backup `pg_restore --verbose --clean --no-acl --no-owner -h localhost -U skillbox -d skillbox latest.dump` diff --git a/server/books/models/topic.py b/server/books/models/topic.py index 9094071e..1b2383fe 100644 --- a/server/books/models/topic.py +++ b/server/books/models/topic.py @@ -40,16 +40,6 @@ class Topic(StrictHierarchyPage): parent_page_types = ['books.Book'] subpage_types = ['books.Module'] - # TODO: THis orders the queryset for the modules but not the visual ordering in cms - # def get_children(self): - # qs = super().get_children() - # qs = qs.order_by('module__meta_title') - # print('') - # for p in qs: - # if hasattr(p, 'module'): - # print(f"{p.module.meta_title} {p.title}") - # return qs - def get_admin_display_title(self): return f"" \ f"{self.get_verbose_name()}- {self.title}" diff --git a/server/core/templates/wagtailadmin/books/topic/index.html b/server/core/templates/wagtailadmin/books/topic/index.html deleted file mode 100644 index 433719f2..00000000 --- a/server/core/templates/wagtailadmin/books/topic/index.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "modeladmin/index.html" %} - -{# The title field for a page in the page listing, when in 'explore' mode #} - -{% load static %} - -{% block content %} -
Saletti
-{# {{ block.super }}#} -{#
#} -{# #} -{#
#} -{% endblock %} diff --git a/server/core/templates/wagtailadmin/pages/listing/_list.html b/server/core/templates/wagtailadmin/pages/listing/_list.html index d178eafa..d7089582 100644 --- a/server/core/templates/wagtailadmin/pages/listing/_list.html +++ b/server/core/templates/wagtailadmin/pages/listing/_list.html @@ -1,3 +1,6 @@ +{# This template is overwritten to create a custom cms ui for the model "chapter" to improve navigation experience. +See MS-538#} + {% load i18n %} {% load l10n %} {% load wagtailadmin_tags %}