From: Guillaume Pellerin Date: Tue, 7 Mar 2017 16:31:15 +0000 (+0100) Subject: Fix urls X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f0aea58f0f68d26b2955835acb9e75455bf6cedb;p=mezzo.git Fix urls --- diff --git a/app/organization/projects/urls.py b/app/organization/projects/urls.py index e9c91a36..d04e4f5d 100644 --- a/app/organization/projects/urls.py +++ b/app/organization/projects/urls.py @@ -38,19 +38,19 @@ urlpatterns = [ url("^projects/blog/(?P.*)/$", ProjectBlogPageView.as_view(), name='organization-project-blogpage-detail'), url("^calls/list/$", ProjectCallListView.as_view(), name='organization-call-list'), - url("^calls/detail/(?P.*)/$", ProjectCallDetailView.as_view(), name='organization-call-detail'), + url("^calls/(?P.*)/detail/$", ProjectCallDetailView.as_view(), name='organization-call-detail'), - url("^calls/detail/(?P.*)/projects/submission/$", ProjectICTCreateView.as_view(), name='organization-project-create'), - url("^calls/detail/(?P.*)/projects/detail/(?P.*)/$", ProjectICTDetailView.as_view(), name='organization-project-detail'), - url("^calls/detail/(?P.*)/projects/lists/$", ProjectICTListView.as_view(), name='organization-project-list'), + url("^calls/(?P.*)/projects/submission/$", ProjectICTCreateView.as_view(), name='organization-project-create'), + url("^calls/(?P.*)/projects/detail/(?P.*)/$", ProjectICTDetailView.as_view(), name='organization-project-detail'), + url("^calls/(?P.*)/projects/list/$", ProjectICTListView.as_view(), name='organization-project-list'), - url("^calls/detail/(?P.*)/producers/submission/$", ProducerCreateView.as_view(), name='organization-producer-create'), - url("^calls/detail/(?P.*)/producers/detail/(?P.*)/$", ProducerDetailView.as_view(), name='organization-producer-detail'), - url("^calls/detail/(?P.*)/producers/lists/$", ProducerListView.as_view(), name='organization-producer-list'), + url("^calls/(?P.*)/producers/submission/$", ProducerCreateView.as_view(), name='organization-producer-create'), + url("^calls/(?P.*)/producers/(?P.*)/detail/$", ProducerDetailView.as_view(), name='organization-producer-detail'), + url("^calls/(?P.*)/producers/list/$", ProducerListView.as_view(), name='organization-producer-list'), - url("^calls/detail/(?P.*)/residencies/submission/$", ProjectResidencyCreateView.as_view(), name='organization-residency-create'), - url("^calls/detail/(?P.*)/residencies/detail/(?P.*)/$", ProjectResidencyDetailView.as_view(), name='organization-residency-detail'), - url("^calls/detail/(?P.*)/residencies/lists/$", ProjectResidencyListView.as_view(), name='organization-residency-list'), + url("^calls/(?P.*)/residencies/submission/$", ProjectResidencyCreateView.as_view(), name='organization-residency-create'), + url("^calls/(?P.*)/residencies/(?P.*)/detail/$", ProjectResidencyDetailView.as_view(), name='organization-residency-detail'), + url("^calls/(?P.*)/residencies/list/$", ProjectResidencyListView.as_view(), name='organization-residency-list'), ] diff --git a/app/organization/projects/views.py b/app/organization/projects/views.py index 6f7d1d2d..6a1e17a7 100644 --- a/app/organization/projects/views.py +++ b/app/organization/projects/views.py @@ -135,7 +135,8 @@ class ProjectICTCreateView(CreateWithInlinesView): inlines = [ProjectICTDataInline, ProjectSimpleImageInline, ProjectContactInline,] def get_context_data(self, **kwargs): - context['call'] = get_object_or_404(ProjectCall, slug=self.kwargs['call_slug']) + context = super(ProjectICTCreateView, self).get_context_data(**kwargs) + context['call'] = get_object_or_404(ProjectCall, slug=self.kwargs['slug']) return context class ProjectICTListView(ListView): diff --git a/app/themes/vertigo_starts_eu/templates/projects/project_call_detail.html b/app/themes/vertigo_starts_eu/templates/projects/project_call_detail.html index b9d35bbd..459baf08 100644 --- a/app/themes/vertigo_starts_eu/templates/projects/project_call_detail.html +++ b/app/themes/vertigo_starts_eu/templates/projects/project_call_detail.html @@ -115,233 +115,18 @@ {% endblock %} {% block page_sub_content %} - - {% if object.type == 'external' %} -
- -
-
-
-
-
-
-
-

{% trans "Project details" %}

- -
- {% if object.program %} -
-
- {% trans "Program" %} -
-
- {{ object.program }} -
-
- {% endif %} - - {% if object.program_type %} -
-
- {% trans "Program type" %} -
-
- {{ object.program_type }} -
-
- {% endif %} - -
-
- {% trans "Beginning" %} -
-
- {{ object.date_from }} -
-
- -
-
- {% trans "End" %} -
-
- {{ object.date_to }} -
-
- -
-
- {% trans "Status" %} -
-
- {{ object.object_status }} -
-
- - {% if object.website %} -
-
- {% trans "Website" %} -
- -
- {% endif %} - - - -
-
-
-
-
-

{% trans "Participants" %}

- -
- - {% if object.lead_team or object.lead_organization %} -
- {% if object.lead_team %} -
- {% trans "Project lead team" %} -
- - {% elif object.lead_organization %} -
- {% trans "Project lead organization" %} -
- - {% endif %} -
- {% endif %} - -
-
- {% trans "Partners" %} -
-
- {% for organization in object.organizations.all %} - {% if organization.url %} - - {% endif %} - {{ organization }}
- {% if organization.url %} -
- {% endif %} - {% endfor %} -
- -
- {% trans "teams" %} ({{ host_organization }}) -
-
- {% for team in object.teams.all %} - {% if team.pages.all %} - {{ team.short }}
- {% endif %} - {% endfor %} -
-
-
-
-
-
-
-
-
-
-
- {% endif %} - {% with object.blocks.all as blocks %} {% include "projects/inc/project_block.html" %} {% endwith %} {% endblock %} {% block page_demo %} -{% if object.demos.all %} -
-
-
-
-
-
-
    -

    {% trans "Demos" %}

    - {% for demo in object.demos.all %} -
  • {{ demo.title }}
  • - {% endfor %} -
-
-
-
-
-
-{% endif %} {% endblock %} {% block page_blog %} -{% if object.blog_pages.all %} -
-
-
-
-
-
-
    -

    {% trans "Blog Pages" %}

    - {% for blog_page in object.blog_pages.all %} -
  • {{ blog_page.title }}
  • - {% endfor %} -
-
-
-
-
-
-{% endif %} {% endblock %} {% block logo %} - {% if object.organizations.all|length > 0 %} -
-
-
-
-
-
    - {% if object.lead_organization %} - {% with object.lead_organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endif %} - {% for organization in object.organizations.all %} - {% with organization.images.all|get_type:'logo' as images %} - {% include 'core/inc/logo.html' %} - {% endwith %} - {% endfor %} -
-
-
-
-
-
- {% endif %} {% endblock %} {% block page_related_content %}