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('',
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<url>.*)$', mil_knowledge_base_view,
+ name="knowledge_base"),
)
handler404 = 'edumed.views.mil_404_view'
<li><a class="menu-kompetencje" href="{% url "curriculum" %}">{% trans 'Competencies' %}</a></li>
<li><a class="menu-takepart" href="{% url "comment_document_index" %}">{% trans 'Take Part' %}</a></li>
{% if request.LANGUAGE_CODE == 'pl' %}
- <li><a class="menu-knowledgebase" href="{% url 'home' subdomain=None %}">Baza wiedzy</a></li>
+ <li><a class="menu-knowledgebase" href="{% url 'knowledge_base' url='' %}">Baza wiedzy</a></li>
{% endif %}
<li><a class="menu-kontakt" href="{% url 'mil_contact' %}">{% trans 'Contact' %}</a></li>
<li>{% lang_switcher %}</li>
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