from django.conf.urls import include, url, patterns
from fnpdjango.utils.urls import i18n_patterns
-from .views import mil_home_view
+from .views import mil_home_view, mil_contact_view
urlpatterns = i18n_patterns('',
url(r'^kompetencje/', include('curriculum.urls')),
url(r'^wez-udzial/', include('comment.urls')),
url(r'^zglos/', include('contact.urls')),
-)
-
-urlpatterns += patterns('',
- url(r'^kontakt/', 'django.contrib.flatpages.views.flatpage', {'url': 'kontakt/'},
- name="info_contact_pl"),
- url(r'^contact/', 'django.contrib.flatpages.views.flatpage', {'url': 'contact/'},
- name="info_contact_en"),
+ url(r'^kontakt/$', mil_contact_view, name='mil_contact')
)
handler404 = 'edumed.views.mil_404_view'
{% if request.LANGUAGE_CODE == 'pl' %}
<li><a class="menu-lekcje" href="{% url 'home' subdomain=None %}">Materiały edukacyjne</a></li>
{% endif %}
- <li><a class="menu-kontakt" href="{% if request.LANGUAGE_CODE == 'pl' %}{% url 'info' url='kontakt/' subdomain=None %}{% else %}{% url 'info' url='contact/' subdomain=None %}{% endif %}">{% trans 'Contact' %}</a></li>
+ <li><a class="menu-kontakt" href="{% url 'mil_contact' %}">{% trans 'Contact' %}</a></li>
<li>{% lang_switcher %}</li>
{% endblock %}
def mil_404_view(request):
return page_not_found(request, '404_mil.html')
+def mil_contact_view(request):
+ return flatpage(request, url = '/kontakt_mil/' if request.LANGUAGE_CODE == 'pl' else '/contact_mil/')
+
class AvatarlessProfileEditView(ProfileEditView):
form_class = AvatarlessEditProfileForm