turn off all translations for contact forms (+ update dates)
[prawokultury.git] / prawokultury / context_processors.py
1 # -*- coding: utf-8 -*-
2 from django.core.urlresolvers import reverse
3
4 from prawokultury.contact_forms import RegistrationForm
5 from .contact_forms import RegisterSpeaker
6
7
8 def registration_url(request):
9     speaker_form = RegisterSpeaker()
10     registration_form = RegistrationForm()
11     if speaker_form.started and not speaker_form.closed:
12         url = reverse("contact_form", args=["register-speaker"])
13     elif speaker_form.closed and not registration_form.started:
14         url = reverse("contact_form", args=["remind-me"])
15     else:
16         url = reverse("contact_form", args=["register"])
17     return {'REGISTRATION_URL': url}