]> git.parisson.com Git - mezzo.git/commitdiff
Fix data pull, ad sub_topic filter
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 23 Sep 2016 08:38:51 +0000 (10:38 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 23 Sep 2016 08:38:51 +0000 (10:38 +0200)
app/organization/core/templatetags/organization_tags.py
app/organization/projects/views.py
app/templates/pages/projectopicpage.html
scripts/pull.sh
scripts/upgrade.sh

index df978b3dba4bd29a67e287a83ae18fa4d60fefaa..1000ea1aa4d695ec80814780852f1db195f206cf 100644 (file)
@@ -8,6 +8,7 @@ from random import shuffle
 
 from organization.festival.models import *
 from organization.magazine.models import *
+from organization.projects.models import *
 
 register = Library()
 
@@ -107,3 +108,7 @@ def get_type_link(objects, name):
 @register.filter
 def in_category(objects, category):
     return objects.filter(category=type)
+
+@register.filter
+def sub_topics(topic):
+    return Topic.objects.filter(parent=topic)
index 717b457efaee00afed82460af9084c898a6820a4..a1e7c31007652749ca2032132f892a109558500a 100644 (file)
@@ -4,12 +4,6 @@ from organization.projects.models import *
 from organization.core.views import *
 
 
-class ProjectListView(ListView):
-
-    model = Project
-    template_name='projects/project_list.html'
-
-
 class ProjectDetailView(SlugMixin, DetailView):
 
     model = Project
index 3a47e02a02ecea9bcdb078883094fb27c2a23c7b..ff57699d0639e257c946a47f89da216fa5f8afe6 100644 (file)
@@ -44,7 +44,7 @@
     {% endif %}
 
     {% with page.projecttopicpage.project_topic as topic %}
-      {% for sub_topic in topic.topics.all %}
+      {% for sub_topic in topic|sub_topics %}
         {{ sub_topic }}
           {% trans "European and national projects" %}<br>
           {% for project in sub_topic.projects.all|get_type:"external project" %}
index f5e3f3955a5f4c0138421a71be71a3901e3b9251..bdb5aa00c075ca3ce2f737427eade835d5f4ea10 100755 (executable)
@@ -4,4 +4,5 @@ sudo chown -R $USER data/media
 sudo chown -R $USER data/backup
 git pull
 git submodule update --init --recursive
+git submodule foreach git pull origin master
 docker-compose run db /srv/scripts/restore_db.sh
index a60d1138395348e2cd7858b25f2f72d1814f207c..d3197a3d2e5c52f776941bbb5c2cbe211ee7d20c 100755 (executable)
@@ -4,6 +4,7 @@
 
 git pull origin dev
 git submodule update --init --recursive
+git submodule foreach git pull origin master
 docker-compose run app python /srv/app/manage.py migrate  --noinput
 bower install
 gulp build