From 5f5eb12589286034863d1f381746e533d648666c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Tue, 14 Jan 2014 11:39:40 +0100 Subject: [PATCH] mil site: knowledge base support --- edumed/milurls.py | 6 ++++-- edumed/templates/base_mil.html | 2 +- edumed/views.py | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/edumed/milurls.py b/edumed/milurls.py index 3ad16c7..b68f1ba 100644 --- a/edumed/milurls.py +++ b/edumed/milurls.py @@ -1,7 +1,7 @@ from django.conf.urls import include, url, patterns from fnpdjango.utils.urls import i18n_patterns -from .views import mil_home_view, mil_contact_view +from .views import mil_home_view, mil_contact_view, mil_knowledge_base_view urlpatterns = i18n_patterns('', @@ -9,7 +9,9 @@ urlpatterns = i18n_patterns('', url(r'^kompetencje/', include('curriculum.urls')), url(r'^wez-udzial/', include('comment.urls')), url(r'^zglos/', include('contact.urls')), - url(r'^kontakt/$', mil_contact_view, name='mil_contact') + url(r'^kontakt/$', mil_contact_view, name='mil_contact'), + url(r'^bazawiedzy/(?P.*)$', mil_knowledge_base_view, + name="knowledge_base"), ) handler404 = 'edumed.views.mil_404_view' diff --git a/edumed/templates/base_mil.html b/edumed/templates/base_mil.html index 45422e4..674ee43 100644 --- a/edumed/templates/base_mil.html +++ b/edumed/templates/base_mil.html @@ -17,7 +17,7 @@
  • {% trans 'Competencies' %}
  • {% trans 'Take Part' %}
  • {% if request.LANGUAGE_CODE == 'pl' %} -
  • Baza wiedzy
  • +
  • Baza wiedzy
  • {% endif %}
  • {% trans 'Contact' %}
  • {% lang_switcher %}
  • diff --git a/edumed/views.py b/edumed/views.py index a6c1aa6..5ac002b 100755 --- a/edumed/views.py +++ b/edumed/views.py @@ -26,5 +26,8 @@ def mil_404_view(request): def mil_contact_view(request): return flatpage(request, url = '/kontakt_mil/' if request.LANGUAGE_CODE == 'pl' else '/contact_mil/') +def mil_knowledge_base_view(request, url): + return flatpage(request, url = 'bazawiedzy/' + url) + class AvatarlessProfileEditView(ProfileEditView): form_class = AvatarlessEditProfileForm -- 2.20.1