From 72362e1b08ec71742a23cefff18f8d138907a587 Mon Sep 17 00:00:00 2001 From: David Morris Date: Sun, 25 May 2025 11:50:49 +0100 Subject: [PATCH 1/4] Adding postwar document close #345 --- cmp/urls.py | 2 ++ cmp/views.py | 6 ++++ templates/cmp/inter-war.html | 54 +++++++++++++++++++++++++++++++ templates/cmp/post-ww2.html | 61 ++++++++++++++++++++++++++++++++++++ templates/navbar.html | 4 +-- 5 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 templates/cmp/inter-war.html create mode 100644 templates/cmp/post-ww2.html diff --git a/cmp/urls.py b/cmp/urls.py index 6a59e96..3b05c3e 100644 --- a/cmp/urls.py +++ b/cmp/urls.py @@ -107,7 +107,9 @@ def protect_patterns(patterns): path('acknowledgements/', views.acknowledgements, name='acknowledgements'), path('ww1-diaries/', views.ww1_diaries, name='ww1-diaries'), + path('inter-war/', views.inter_war, name='inter-war'), path('ww2-diaries/', views.ww2_diaries, name='ww2-diaries'), + path('post-ww2/', views.post_ww2, name='post-ww2'), path('accounts/', include('allauth.urls')), path('', include(protect_patterns(mgmt_patterns))), diff --git a/cmp/views.py b/cmp/views.py index 1af525f..9810173 100644 --- a/cmp/views.py +++ b/cmp/views.py @@ -1050,9 +1050,15 @@ def war_diaries(request): def ww1_diaries(request): return render(request, 'cmp/ww1-diaries.html') +def inter_war(request): + return render(request, 'cmp/inter-war.html') + def ww2_diaries(request): return render(request, 'cmp/ww2-diaries.html') +def post_ww2(request): + return render(request, 'cmp/post-ww2.html') + def decorations_report(request): # Get top 10 soldiers with most decorations soldiers_with_decorations = Soldier.objects.annotate( diff --git a/templates/cmp/inter-war.html b/templates/cmp/inter-war.html new file mode 100644 index 0000000..89d7c98 --- /dev/null +++ b/templates/cmp/inter-war.html @@ -0,0 +1,54 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Inter-War Period{% endblock %} + +{% block content %} + + +
+ The badge of the Royal Military Police +

Corps of Military Police

+{% include 'navbar.html' %} +
+ + +
+

Inter-War Period

+ +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/cmp/post-ww2.html b/templates/cmp/post-ww2.html new file mode 100644 index 0000000..61e58b7 --- /dev/null +++ b/templates/cmp/post-ww2.html @@ -0,0 +1,61 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Post World War II Diaries{% endblock %} + +{% block content %} + + +
+ The badge of the Royal Military Police +

Corps of Military Police

+{% include 'navbar.html' %} +
+ + +
+

Post World War II

+ +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/navbar.html b/templates/navbar.html index 4edc35f..3de3544 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -12,13 +12,13 @@ World War I
  • - Inter-War Period + Inter-War Period
  • World War II
  • - Post World War II + Post World War II
  • From ac3e871f9482afa87ca5e6bbbc5415501d411e4a Mon Sep 17 00:00:00 2001 From: David Morris Date: Mon, 26 May 2025 08:55:20 +0100 Subject: [PATCH 2/4] Tidy ww1 and interwar --- templates/cmp/inter-war.html | 21 ++++++++++++++++++++- templates/cmp/ww1-diaries.html | 11 +++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/templates/cmp/inter-war.html b/templates/cmp/inter-war.html index 89d7c98..0d89953 100644 --- a/templates/cmp/inter-war.html +++ b/templates/cmp/inter-war.html @@ -47,7 +47,26 @@

    Corps of Military Police

    diff --git a/templates/cmp/ww1-diaries.html b/templates/cmp/ww1-diaries.html index d65556d..d469f18 100644 --- a/templates/cmp/ww1-diaries.html +++ b/templates/cmp/ww1-diaries.html @@ -46,6 +46,12 @@

    Corps of Military Police

    From 5923499b78c40a96744907e4590a13fd63fcde66 Mon Sep 17 00:00:00 2001 From: David Morris Date: Mon, 26 May 2025 09:00:48 +0100 Subject: [PATCH 3/4] Adding styling --- templates/cmp/inter-war.html | 7 ++++--- templates/cmp/post-ww2.html | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/templates/cmp/inter-war.html b/templates/cmp/inter-war.html index 0d89953..9506a4e 100644 --- a/templates/cmp/inter-war.html +++ b/templates/cmp/inter-war.html @@ -43,10 +43,10 @@

    Corps of Military Police

    {% include 'navbar.html' %} - {% endblock %} \ No newline at end of file diff --git a/templates/cmp/post-ww2.html b/templates/cmp/post-ww2.html index 61e58b7..2eb563f 100644 --- a/templates/cmp/post-ww2.html +++ b/templates/cmp/post-ww2.html @@ -43,10 +43,10 @@

    Corps of Military Police

    {% include 'navbar.html' %} - {% endblock %} \ No newline at end of file From e6440efd1e0349e0e40184f0e8d1c06a682e8ead Mon Sep 17 00:00:00 2001 From: David Morris Date: Wed, 28 May 2025 07:14:57 +0100 Subject: [PATCH 4/4] Further tidyance --- templates/cmp/inter-war.html | 4 ---- templates/cmp/ww1-diaries.html | 4 ++++ templates/cmp/ww2-diaries.html | 29 +++++++++++++---------------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/templates/cmp/inter-war.html b/templates/cmp/inter-war.html index 9506a4e..744f107 100644 --- a/templates/cmp/inter-war.html +++ b/templates/cmp/inter-war.html @@ -47,9 +47,6 @@

    Corps of Military Police

    Inter-War Period

    Miscellaneous Information