From b02d17129f06c1397e5ab14f6216dbedd62ca5ef Mon Sep 17 00:00:00 2001 From: Dave Horsfall Date: Fri, 17 Apr 2026 09:50:31 +0100 Subject: [PATCH 01/12] add governance and licensing pages --- .pre-commit-config.yaml | 2 + .../main/pages/policies/governance.html | 19 +++++ .../main/pages/policies/licensing.html | 19 +++++ .../main/pages/{ => policies}/privacy.html | 3 +- .../main/pages/{ => policies}/terms.html | 1 + main/templates/main/snippets/footer.html | 8 +-- main/urls.py | 2 + main/views/page_views.py | 71 ++++++++++++++++++- pyproject.toml | 2 + tests/main/test_main_views.py | 4 +- 10 files changed, 121 insertions(+), 10 deletions(-) create mode 100644 main/templates/main/pages/policies/governance.html create mode 100644 main/templates/main/pages/policies/licensing.html rename main/templates/main/pages/{ => policies}/privacy.html (98%) rename main/templates/main/pages/{ => policies}/terms.html (98%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 309f5bc9..08068435 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,8 @@ repos: additional_dependencies: - django-stubs[compatible-mypy] - django-stubs-ext + - types-Markdown + - types-requests - django-bootstrap5 - django-registration - django-crispy-forms diff --git a/main/templates/main/pages/policies/governance.html b/main/templates/main/pages/policies/governance.html new file mode 100644 index 00000000..f13e1c99 --- /dev/null +++ b/main/templates/main/pages/policies/governance.html @@ -0,0 +1,19 @@ +{% extends "main/base.page.html" %} +{% load static %} +{% block title %} + Digital Research Competencies Framework +{% endblock title %} +{% block breadcrumb_items %} + + +{% endblock breadcrumb_items %} +{% block content %} +
+

{{ page_heading }}

+
+
+
+
{{ markdown_content|safe }}
+
+
+{% endblock content %} diff --git a/main/templates/main/pages/policies/licensing.html b/main/templates/main/pages/policies/licensing.html new file mode 100644 index 00000000..7f739e9f --- /dev/null +++ b/main/templates/main/pages/policies/licensing.html @@ -0,0 +1,19 @@ +{% extends "main/base.page.html" %} +{% load static %} +{% block title %} + Digital Research Competencies Framework +{% endblock title %} +{% block breadcrumb_items %} + + +{% endblock breadcrumb_items %} +{% block content %} +
+

{{ page_heading }}

+
+
+
+
{{ markdown_content|safe }}
+
+
+{% endblock content %} diff --git a/main/templates/main/pages/privacy.html b/main/templates/main/pages/policies/privacy.html similarity index 98% rename from main/templates/main/pages/privacy.html rename to main/templates/main/pages/policies/privacy.html index 6840f5ef..ec809937 100644 --- a/main/templates/main/pages/privacy.html +++ b/main/templates/main/pages/policies/privacy.html @@ -4,7 +4,8 @@ Digital Research Competencies Framework {% endblock title %} {% block breadcrumb_items %} - + + {% endblock breadcrumb_items %} {% block content %}
diff --git a/main/templates/main/pages/terms.html b/main/templates/main/pages/policies/terms.html similarity index 98% rename from main/templates/main/pages/terms.html rename to main/templates/main/pages/policies/terms.html index 363e2c99..9dbac4cd 100644 --- a/main/templates/main/pages/terms.html +++ b/main/templates/main/pages/policies/terms.html @@ -4,6 +4,7 @@ Digital Research Competencies Framework {% endblock title %} {% block breadcrumb_items %} + {% endblock breadcrumb_items %} {% block content %} diff --git a/main/templates/main/snippets/footer.html b/main/templates/main/snippets/footer.html index e86fbff4..ccb9a75c 100644 --- a/main/templates/main/snippets/footer.html +++ b/main/templates/main/snippets/footer.html @@ -90,13 +90,13 @@
About
Framework