--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.10 on 2016-10-07 08:45
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+def update_project_type(apps, schema_editor):
+ Project = apps.get_model("organization-projects", "Project")
+ for project in Project.objects.all():
+ if project.type == 'external project':
+ project.type = 'external'
+ project.save()
+ if project.type == 'internal project':
+ project.type = 'internal'
+ project.save()
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-projects', '0018_auto_20161005_1424'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='project',
+ name='type',
+ field=models.CharField(choices=[('internal', 'internal'), ('external', 'external')], max_length=128, verbose_name='type'),
+ ),
+ migrations.RunPython(update_project_type),
+ ]
PROJECT_TYPE_CHOICES = [
- ('internal project', _('internal project')),
- ('external project', _('external project')),
+ ('internal', _('internal')),
+ ('external', _('external')),
]
class Project(Displayable, Period, RichText):
{% endblock %}
{% block related_project %}
- {% if page.teampage.team.leader_projects.all or page.teampage.team.patner_projects.all %}
- <hr>
+ {% if page.teampage.team.leader_projects.all or page.teampage.team.partner_projects.all %}
+ <hr class="mt0" />
+ <h4>{% trans "European and national projects" %}</h4>
+ {% with page.teampage.team.leader_projects.all|get_type:"external" as projects %}
+ {% include 'projects/inc/project_list.html' %}
+ {% endwith %}
+ {% with page.teampage.team.partner_projects.all|get_type:"external" as projects %}
+ {% include 'projects/inc/project_list.html' %}
+ {% endwith %}
+ {% if page.teampage.product_lists.all %}
+ <h4>{% trans "Products" %}</h4>
+ {% for page_product_list in page.teampage.product_lists.all %}
+ {% with page_product_list.list as list %}
+ {% with "shop/includes/product_list_"|add:list.style|add:"_style.html" as template %}
+ {% include template %}
+ {% endwith %}
+ {% endwith %}
+ {% endfor %}
+ {% endif %}
{% endif %}
- {% if page.teampage.team.leader_projects.all %}
- <h4>{% trans 'Main projects' %}</h4>
- {% with page.teampage.team.leader_projects.all as projects %}
- {% include 'projects/project_list.html' %}
- {% endwith %}
- {% endif %}
- {% if page.teampage.team.patner_projects.all %}
- <h4>{% trans 'Partner projects' %}</h4>
- {% with page.teampage.team.patner_projects.all as projects %}
- {% include 'projects/project_list.html' %}
- {% endwith %}
- {% endif %}
{% endblock %}
{% block logo %}