]> git.parisson.com Git - mezzo.git/commitdiff
add locations view
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 5 Apr 2016 14:57:54 +0000 (16:57 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Tue, 5 Apr 2016 14:57:54 +0000 (16:57 +0200)
Dockerfile
app/festival/urls.py
app/festival/views.py
requirements-dev.txt

index 094a278e8cbcb1a86542333fa5012340773550c4..ab3dd4aa4f7dc1cb60ea0833ad261dc320beb354 100644 (file)
@@ -12,7 +12,7 @@ ENV LANGUAGE fr_FR:fr
 ENV LC_ALL fr_FR.UTF-8
 
 RUN mkdir /srv/app
-RUN mkdir /srv/src
+RUN mkdir /srv/lib
 WORKDIR /srv/app
 
 ADD requirements.txt /srv/app/
index 686b4770b5572fd9c96ee31596807eb79706f6ff..61e51e073a8f93faeb5b74890a7eb657931e790a 100644 (file)
@@ -14,4 +14,5 @@ urlpatterns = [
     url(r'^artists/(?P<slug>.*)/$', ArtistDetailView.as_view(), name="festival-artist-detail"),
     url(r'^videos/$', VideoListView.as_view(), name="festival-video-list"),
     url(r'^videos/(?P<slug>.*)/$', VideoDetailView.as_view(), name="festival-video-detail"),
+    url(r'^locations/$', LocationListView.as_view(), name="festival-location-list"),
 ]
index 7abd16b5c63799b1a99c79a1a0c75491963358ae..500fd96176fac1d5702076a46b4bf60943d690f1 100644 (file)
@@ -4,6 +4,7 @@ from django.views.generic.base import *
 from django.shortcuts import get_object_or_404
 
 from festival.models import *
+from mezzanine_agenda.models import EventLocation
 
 
 class SlugMixin(object):
@@ -53,4 +54,13 @@ class VideoDetailView(SlugMixin, DetailView):
     def get_context_data(self, **kwargs):
         context = super(VideoDetailView, self).get_context_data(**kwargs)
         return context
-        
+
+
+class LocationListView(ListView):
+
+    model = EventLocation
+    template_name='agenda/event_location_list.html'
+
+    def get_context_data(self, **kwargs):
+        context = super(LocationListView, self).get_context_data(**kwargs)
+        return context
index 1bd2408989c7cdecb8ba8e1b95dd73fe2be78736..4e0ea0ebab83c00be98ab0993fced20ba95866a2 100644 (file)
@@ -1,4 +1,3 @@
 -e git+https://github.com/yomguy/mezzanine-agenda.git#egg=mezzanine-agenda-0.2.2
 -e git+https://github.com/stephenmcd/mezzanine.git#egg=mezzanine-4.1-dev
 https://forge.ircam.fr/p/django-eve/source/download/dev/
-