Skip to content

Commit

Permalink
Add route for catalogue item
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Aug 27, 2024
1 parent 58a03dc commit e5c465a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/search/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
urlpatterns = [
path("", views.index, name="index"),
path("catalogue/", views.catalogue_index, name="catalogue"),
path("catalogue/id/<str:id>/", views.catalogue_item, name="catalogue_item"),
]
6 changes: 6 additions & 0 deletions app/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ def catalogue_index(request):
template = loader.get_template("search/catalogue/index.html")
context = {"foo": "bar"}
return HttpResponse(template.render(context, request))


def catalogue_item(request, id):
template = loader.get_template("search/catalogue/item.html")
context = {"id": id}
return HttpResponse(template.render(context, request))
13 changes: 13 additions & 0 deletions app/templates/search/catalogue/item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% extends 'base.html' %}

{%- set pageTitle = 'Catalogue item ' + id -%}

{% block content %}
<div class="tna-section">
<div class="tna-container">
<div class="tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny">
<h1 class="tna-heading-xl">{{ pageTitle }}</h1>
</div>
</div>
</div>
{% endblock %}

0 comments on commit e5c465a

Please sign in to comment.