]> git.parisson.com Git - mezzo.git/commitdiff
add various organization views and templates
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 15 Jul 2016 14:00:54 +0000 (16:00 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 15 Jul 2016 14:00:54 +0000 (16:00 +0200)
12 files changed:
app/organization/featured/views.py
app/organization/magazine/views.py
app/organization/project/views.py
app/organization/team/views.py
app/templates/project/project_detail.html [new file with mode: 0644]
app/templates/project/project_list.html [new file with mode: 0644]
app/templates/team/department_detail.html [new file with mode: 0644]
app/templates/team/department_list.html [new file with mode: 0644]
app/templates/team/person_detail.html [new file with mode: 0644]
app/templates/team/person_list.html [new file with mode: 0644]
app/templates/team/team_detail.html [new file with mode: 0644]
app/templates/team/team_list.html [new file with mode: 0644]

index 91ea44a218fbd2f408430959283f0419c921093e..2536b376efd02b2fa61e25f2dfa2552042caf0b8 100644 (file)
@@ -1,3 +1 @@
 from django.shortcuts import render
-
-# Create your views here.
index 7e83d1694419ec3cf17eba1b64d3c3f06229cc8b..0ad63f47960d3b22f375dcf01c998192548ace9a 100644 (file)
@@ -8,7 +8,7 @@ from django.shortcuts import get_object_or_404
 from organization.magazine.models import Article, Brief
 from organization.core.views import SlugMixin
 
-# Create your views here.
+
 class ArticleDetailView(SlugMixin, DetailView):
 
     model = Article
@@ -19,6 +19,7 @@ class ArticleDetailView(SlugMixin, DetailView):
         context = super(ArticleDetailView, self).get_context_data(**kwargs)
         return context
 
+
 class ArticleListView(SlugMixin, ListView):
 
     model = Article
@@ -30,7 +31,6 @@ class ArticleListView(SlugMixin, ListView):
         return context
 
 
-# Create your views here.
 class BriefDetailView(SlugMixin, DetailView):
 
     model = Brief
index 91ea44a218fbd2f408430959283f0419c921093e..5d078e3a4ff284f1fe0d522e3a0a5ec7ffa38a9f 100644 (file)
@@ -1,3 +1,16 @@
 from django.shortcuts import render
 
-# Create your views here.
+from organization.core.views import *
+
+
+class ProjectListView(ListView):
+
+    model = Project
+    template_name='project/project_list.html'
+
+
+class ProjectDetailView(SlugMixin, DetailView):
+
+    model = Project
+    template_name='project/project_detail.html'
+    context_object_name = 'project'
index 91ea44a218fbd2f408430959283f0419c921093e..1eae93eb327ec956554d075c18a3877f475802f3 100644 (file)
@@ -1,3 +1,43 @@
 from django.shortcuts import render
 
-# Create your views here.
+from organization.team.models import *
+from organization.core.views import *
+
+
+class DepartmentListView(ListView):
+
+    model = Department
+    template_name='team/department_list.html'
+
+
+class DepartmentDetailView(SlugMixin, DetailView):
+
+    model = Department
+    template_name='team/department_detail.html'
+    context_object_name = 'department'
+
+
+class TeamListView(ListView):
+
+    model = Team
+    template_name='team/team_list.html'
+
+
+class TeamDetailView(SlugMixin, DetailView):
+
+    model = Team
+    template_name='team/team_detail.html'
+    context_object_name = 'team'
+
+
+class PersonListView(ListView):
+
+    model = Person
+    template_name='team/person_list.html'
+
+
+class PersonDetailView(SlugMixin, DetailView):
+
+    model = Person
+    template_name='team/person_detail.html'
+    context_object_name = 'person'
diff --git a/app/templates/project/project_detail.html b/app/templates/project/project_detail.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/templates/project/project_list.html b/app/templates/project/project_list.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/templates/team/department_detail.html b/app/templates/team/department_detail.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/templates/team/department_list.html b/app/templates/team/department_list.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/templates/team/person_detail.html b/app/templates/team/person_detail.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/templates/team/person_list.html b/app/templates/team/person_list.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/templates/team/team_detail.html b/app/templates/team/team_detail.html
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/app/templates/team/team_list.html b/app/templates/team/team_list.html
new file mode 100644 (file)
index 0000000..e69de29