From 24c5a945607f9675a01eeb0a942e02932b639cca Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 2 May 2021 13:39:28 +0200 Subject: [PATCH 1/3] enable save_as on InfoCategory and InfoItem admin classes --- src/info/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/info/admin.py b/src/info/admin.py index f2b80031..82eb1599 100644 --- a/src/info/admin.py +++ b/src/info/admin.py @@ -6,6 +6,7 @@ from .models import InfoCategory, InfoItem @admin.register(InfoItem) class InfoItemAdmin(VersionAdmin): + save_as = True list_filter = ["category", "category__team__camp"] list_display = ["headline"] @@ -17,7 +18,8 @@ class InfoItemInlineAdmin(admin.StackedInline): @admin.register(InfoCategory) -class InfoCategorydmin(admin.ModelAdmin): +class InfoCategoryAdmin(admin.ModelAdmin): + save_as = True list_filter = ["team__camp"] list_display = ["headline"] search_fields = ["headline", "body"] From f999347402b2d5b917d21c503137d4c831a5a392 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 2 May 2021 13:45:02 +0200 Subject: [PATCH 2/3] update pre-commit hooks --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5c993f52..3f770273 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ repos: - repo: "https://github.com/ambv/black" - rev: "stable" + rev: "21.4b2" hooks: - id: "black" language_version: "python3.7" - - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: "v2.3.0" + - repo: "https://gitlab.com/pycqa/flake8" + rev: "3.9.1" hooks: - id: "flake8" - repo: "https://github.com/pre-commit/mirrors-isort" - rev: "v4.3.21" + rev: "v5.8.0" hooks: - id: "isort" From e3b1f5f325d477627bf44972c258921778dd86cb Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 2 May 2021 14:21:48 +0200 Subject: [PATCH 3/3] add 2021 and remove 2019 from camps menu --- src/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/base.html b/src/templates/base.html index a969be38..ddd3ed42 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -81,8 +81,8 @@