Commit 25b37d6f authored by Evert Prants's avatar Evert Prants

Add a page with full list of shows

parent c9350f35
{% extends "base.html" %}
{% block content %}
<div class="container mt-4 mb-4">
<h1>Show Index</h1>
<div class="row">
{% for show in shows %}
<div class="col">
<a href="/show/{{show.abbr}}">{{show.name}}</a>
</div>
{% if forloop.counter|divisibleby:3 %}
<div class="w-100"></div>
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}
......@@ -22,6 +22,7 @@ urlpatterns = [
url(r'^logout/$', views.LogoutView),
url(r'^login/redirect$', views.LoginRedirect.as_view()),
url(r'^login$', views.Login.as_view()),
url(r'^shows/$', views.Shows.as_view()),
url(r'^$', views.LandingPage.as_view()),
]
......@@ -92,5 +92,11 @@ class LandingPage(TemplateView):
'boards': DiscussionBoard.objects.count()
}
return ctx
class Shows(TemplateView):
template_name = "shows.html"
def get_context_data(self, **kwargs):
ctx = super().get_context_data()
ctx['shows'] = Show.objects.all()
return ctx
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment