Skip to content

Commit

Permalink
Army number search tool page.
Browse files Browse the repository at this point in the history
  • Loading branch information
gm3dmo committed Sep 29, 2023
1 parent 89281cd commit cef5939
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
urlpatterns = [
path("", views.index, name="index"),
path("sentry-debug/", views.trigger_error ),
path("tools/army-number-search", views.original_unit, name="army-number-search" ),
path("tools/army-number-search", views.army_number_search, name="army-number-search" ),
path("tools/army-number-search/<int:army_number>" , views.original_unit, name="army-number-search" ),
]
3 changes: 3 additions & 0 deletions cmp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def index(request):
return HttpResponse("home")


def army_number_search(request):
return render(request, 'cmp/army-number-search.html')

def trigger_error(request):
"""error for Sentry"""
division_by_zero = 1 / 0
Expand Down
2 changes: 1 addition & 1 deletion core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"DIRS": [os.path.join( BASE_DIR, 'templates' )],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
Expand Down
20 changes: 20 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{% load static %}

<!DOCTYPE html >
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CMP {% block title %} {% endblock %}</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IM+Fell+English&display=swap" rel="stylesheet">
{% block styles %}{% endblock %}
</head>
<body>
{% block content %}{% endblock %}
{% block scripts %}{% endblock %}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions templates/cmp/army-number-search.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}Army Number Search{% endblock %}
{% block content %}
<div>
<p>
This search tool can match army numbers from the 1920's to the end of World War 2 which was based on the regiment that a soldier joined initially, and the post war numbering system which is army wide. Pre 1920's, soldiers had regimental numbers so this site cannot be used for matching those.
</p>
<p>
Enter an army number to find out what unit/regiment block the number was assigned from (upto WW2) or approximately when the soldier joined the army (post WW2).
</p>
</div>
{% endblock %}

0 comments on commit cef5939

Please sign in to comment.