From 64aaa892d7bbe12813bf9553d9efa3d8f919d87e Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Mon, 25 Jul 2016 23:10:41 +0200 Subject: [PATCH] update team list and detail views (add pageblocks), fix urls --- app/organization/team/urls.py | 2 +- app/organization/urls.py | 10 +++++----- app/templates/pages/team.html | 7 ++++++- app/templates/team/team_list.html | 18 ++++++++++++++++++ app/urls.py | 2 +- 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/app/organization/team/urls.py b/app/organization/team/urls.py index ee467fca..59b66b53 100644 --- a/app/organization/team/urls.py +++ b/app/organization/team/urls.py @@ -11,5 +11,5 @@ from organization.team.views import * urlpatterns = [ - + url(r'^(?P.*)/teams/$', TeamListView.as_view(), name="organization-team-team-list"), ] diff --git a/app/organization/urls.py b/app/organization/urls.py index adafa016..5f4d6c42 100644 --- a/app/organization/urls.py +++ b/app/organization/urls.py @@ -13,9 +13,9 @@ from mezzanine.conf import settings urlpatterns = [ url("^", include('organization.core.urls')), - url("^festival/", include('organization.festival.urls')), - url("^magazine/", include('organization.magazine.urls')), - url("^media/", include('organization.media.urls')), - url("^project/", include('organization.project.urls')), - url("^team/", include('organization.team.urls')), + url("^", include('organization.festival.urls')), + url("^", include('organization.magazine.urls')), + url("^", include('organization.media.urls')), + url("^", include('organization.project.urls')), + url("^", include('organization.team.urls')), ] diff --git a/app/templates/pages/team.html b/app/templates/pages/team.html index 916142bc..ab3f9feb 100644 --- a/app/templates/pages/team.html +++ b/app/templates/pages/team.html @@ -47,8 +47,13 @@ {% for pageblock in page.team.pageblock_set.all %} -
+
+
+
+

{{ pageblock.title }}

+
{{ pageblock.content|richtext_filters|safe }} +
{% endfor %} diff --git a/app/templates/team/team_list.html b/app/templates/team/team_list.html index e69de29b..6caa35a5 100644 --- a/app/templates/team/team_list.html +++ b/app/templates/team/team_list.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} +{% load i18n mezzanine_tags keyword_tags featured_tags pages_tags %} + +{% block title %} + {% trans "Team list" %} +{% endblock %} + +{% block main %} + + {% for team in object_list %} +
+
+ {{ team.title }} +
+
+ {% endfor %} + +{% endblock %} diff --git a/app/urls.py b/app/urls.py index 6e0a5d17..2bf71e8b 100644 --- a/app/urls.py +++ b/app/urls.py @@ -30,7 +30,7 @@ urlpatterns += [ # App urls url("^", include('organization.urls')), - url("^%s/" % settings.EVENT_SLUG, include("mezzanine_agenda.urls")), + url("^events/%s/" % settings.EVENT_SLUG, include("mezzanine_agenda.urls")), url("^styles/$", direct_to_template, {"template": "styles.html"}, name="styles"), # We don't want to presume how your homepage works, so here are a -- 2.39.5