diff --git a/bornhack/urls.py b/bornhack/urls.py index 68c1b5db..8e027abe 100644 --- a/bornhack/urls.py +++ b/bornhack/urls.py @@ -67,6 +67,12 @@ urlpatterns = [ url(r'^accounts/', include('allauth.urls')), url(r'^admin/', include(admin.site.urls)), + url( + r'^camps/$', + CampListView.as_view(), + name='camp_list' + ), + # camp specific urls below here url( diff --git a/camps/templates/camp_detail.html b/camps/templates/camp_detail.html deleted file mode 100644 index c1569f76..00000000 --- a/camps/templates/camp_detail.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends 'base.html' %} -{% load commonmark %} -{% load static from staticfiles %} -{% block content %} -
-
- -
- -{{ camp.description|commonmark }} -{% endblock content %} - diff --git a/camps/templates/camp_detail_bornhack-2017.html b/camps/templates/camp_detail_bornhack-2017.html index 0b531aa2..c11ecd88 100644 --- a/camps/templates/camp_detail_bornhack-2017.html +++ b/camps/templates/camp_detail_bornhack-2017.html @@ -15,7 +15,7 @@
- {% thumbnail 'img/bornhack-2016/esbjerg' '1600x988-B12A2612.jpg' 'A quiet moment in the chillout area by the bar' %} + {% thumbnail 'img/bornhack-2016/esbjerg' '1600x988-B12A2610.jpg' 'The family area at BornHack 2016' %}
diff --git a/camps/templates/camp_list.html b/camps/templates/camp_list.html new file mode 100644 index 00000000..5119693c --- /dev/null +++ b/camps/templates/camp_list.html @@ -0,0 +1,43 @@ +{% extends 'base.html' %} +{% load commonmark %} +{% load static from staticfiles %} +{% load imageutils %} +{% block content %} +
+
+ + + + + + + + + + + + {% for listcamp in camps %} + + + + + + + + + {% empty %} +

No camps found, what gives?!

+ {% endfor %} + +
NameTaglineBuildupCampTeardown
{{ listcamp.title }}{{ listcamp.tagline }}{{ listcamp.buildup.lower }} to {{ listcamp.buildup.upper }}{{ listcamp.camp.lower }} to {{ listcamp.camp.upper }}{{ listcamp.teardown.lower }} to {{ listcamp.teardown.upper }}
+
+
+ +{% endblock content %} + diff --git a/camps/templates/camps/camp_form.html b/camps/templates/camps/camp_form.html deleted file mode 100644 index bbc491d7..00000000 --- a/camps/templates/camps/camp_form.html +++ /dev/null @@ -1,4 +0,0 @@ -
- {{ form }} - -
diff --git a/camps/templates/camps/camp_list.html b/camps/templates/camps/camp_list.html deleted file mode 100644 index 1edeb228..00000000 --- a/camps/templates/camps/camp_list.html +++ /dev/null @@ -1,3 +0,0 @@ -{% for camp in camps %} - {{ camp }}
-{% endfor %} diff --git a/camps/views.py b/camps/views.py index 371a8dd1..d83c7527 100644 --- a/camps/views.py +++ b/camps/views.py @@ -10,3 +10,8 @@ class CampDetailView(DetailView): def get_template_names(self): return 'camp_detail_%s.html' % self.get_object().slug + +class CampListView(ListView): + model = Camp + template_name = 'camp_list.html' + diff --git a/templates/base.html b/templates/base.html index 005ceedf..d0bb073c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -18,6 +18,8 @@ + {% bootstrap_javascript jquery=1 %} + {% block extra_head %} {% endblock %} @@ -47,9 +49,8 @@
  • Contact
  • @@ -91,7 +92,6 @@ - {% bootstrap_javascript jquery=1 %}