From: Aleksander Łukasz Date: Fri, 15 Nov 2013 08:57:32 +0000 (+0100) Subject: Bring back competencies catalogue to the main site X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/a3a0959e8b5931b8cb97ccb4d691240f4e5a93f0 Bring back competencies catalogue to the main site --- diff --git a/curriculum/templates/curriculum/competence_detail.html b/curriculum/templates/curriculum/competence_detail.html index 20125ff..7bb76e1 100755 --- a/curriculum/templates/curriculum/competence_detail.html +++ b/curriculum/templates/curriculum/competence_detail.html @@ -1,4 +1,4 @@ -{% extends "base_mil.html" %} +{% extends base_template %} {% block title %}{{ object }}{% endblock %} diff --git a/curriculum/templates/curriculum/competence_list.html b/curriculum/templates/curriculum/competence_list.html index 3009b49..a180ae7 100755 --- a/curriculum/templates/curriculum/competence_list.html +++ b/curriculum/templates/curriculum/competence_list.html @@ -1,4 +1,4 @@ -{% extends "base_mil.html" %} +{% extends base_template %} {% load chunks %} {% load i18n %} diff --git a/edumed/context_processors.py b/edumed/context_processors.py new file mode 100644 index 0000000..63e1df1 --- /dev/null +++ b/edumed/context_processors.py @@ -0,0 +1,3 @@ +def base_template(request): + base_template = 'base_mil.html' if request.META.get('HTTP_HOST').startswith('katalog') else 'base.html' + return dict(base_template = base_template) \ No newline at end of file diff --git a/edumed/settings.d/40-context.py b/edumed/settings.d/40-context.py index 0cf10b8..6e43646 100644 --- a/edumed/settings.d/40-context.py +++ b/edumed/settings.d/40-context.py @@ -10,4 +10,5 @@ TEMPLATE_CONTEXT_PROCESSORS = tuple(x for x in ( if 'django.contrib.messages' in INSTALLED_APPS else None, "django.core.context_processors.request", 'pybb.context_processors.processor', + 'edumed.context_processors.base_template' ) if x is not None) diff --git a/edumed/templates/base.html b/edumed/templates/base.html index a30f6ab..1823749 100644 --- a/edumed/templates/base.html +++ b/edumed/templates/base.html @@ -7,6 +7,7 @@ {% block top_navigation %}
  • Lekcje
  • Współpraca
  • +
  • Kompetencje
  • Turniej
  • Wesprzyj nas
  • O nas
  • diff --git a/edumed/urls.py b/edumed/urls.py index af3cb28..059821b 100644 --- a/edumed/urls.py +++ b/edumed/urls.py @@ -14,6 +14,7 @@ urlpatterns = patterns('', url(r'^forum/profile/edit/$', AvatarlessProfileEditView.as_view(), name='edit_profile'), url(r'^forum/', include('forum.urls')), url(r'^forum/', include('pybb.urls', namespace='pybb')), + url(r'^kompetencje/', include('curriculum.urls')), )