fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ae48c9c
)
Bring back competencies catalogue to the main site
author
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 15 Nov 2013 08:57:32 +0000
(09:57 +0100)
committer
Aleksander Łukasz
<aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 15 Nov 2013 08:57:32 +0000
(09:57 +0100)
curriculum/templates/curriculum/competence_detail.html
patch
|
blob
|
history
curriculum/templates/curriculum/competence_list.html
patch
|
blob
|
history
edumed/context_processors.py
[new file with mode: 0644]
patch
|
blob
edumed/settings.d/40-context.py
patch
|
blob
|
history
edumed/templates/base.html
patch
|
blob
|
history
edumed/urls.py
patch
|
blob
|
history
diff --git
a/curriculum/templates/curriculum/competence_detail.html
b/curriculum/templates/curriculum/competence_detail.html
index
20125ff
..
7bb76e1
100755
(executable)
--- 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 %}
{% block title %}{{ object }}{% endblock %}
diff --git
a/curriculum/templates/curriculum/competence_list.html
b/curriculum/templates/curriculum/competence_list.html
index
3009b49
..
a180ae7
100755
(executable)
--- 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 %}
{% load chunks %}
{% load i18n %}
diff --git a/edumed/context_processors.py
b/edumed/context_processors.py
new file mode 100644
(file)
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
(file)
--- 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',
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)
) if x is not None)
diff --git
a/edumed/templates/base.html
b/edumed/templates/base.html
index
a30f6ab
..
1823749
100644
(file)
--- a/
edumed/templates/base.html
+++ b/
edumed/templates/base.html
@@
-7,6
+7,7
@@
{% block top_navigation %}
<li><a class="menu-lekcje" href="{% url "catalogue_lessons" %}">Lekcje</a></li>
<li><a class="menu-wspolpraca" href="{% url "info" "wspolpraca/" %}">Współpraca</a></li>
{% block top_navigation %}
<li><a class="menu-lekcje" href="{% url "catalogue_lessons" %}">Lekcje</a></li>
<li><a class="menu-wspolpraca" href="{% url "info" "wspolpraca/" %}">Współpraca</a></li>
+ <li><a class="menu-kompetencje" href="{% url "curriculum" %}">Kompetencje</a></li>
<li><a class="menu-szkolenia" href="{% url "info" "turniej/" %}">Turniej</a></li>
<li><a class="menu-wesprzyj" href="{% url "info" "wesprzyj/" %}">Wesprzyj nas</a></li>
<li><a class="menu-o-nas" href="{% url "info" "o-nas/" %}">O nas</a></li>
<li><a class="menu-szkolenia" href="{% url "info" "turniej/" %}">Turniej</a></li>
<li><a class="menu-wesprzyj" href="{% url "info" "wesprzyj/" %}">Wesprzyj nas</a></li>
<li><a class="menu-o-nas" href="{% url "info" "o-nas/" %}">O nas</a></li>
diff --git
a/edumed/urls.py
b/edumed/urls.py
index
af3cb28
..
059821b
100644
(file)
--- 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'^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')),
)
)