diff --git a/humbug/settings.py b/humbug/settings.py index 2a9c793684..567fa3ab8b 100644 --- a/humbug/settings.py +++ b/humbug/settings.py @@ -187,6 +187,10 @@ LOGGING = { } } +TEMPLATE_CONTEXT_PROCESSORS = ( + 'zephyr.context_processors.add_settings', +) + ACCOUNT_ACTIVATION_DAYS=7 EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' @@ -202,9 +206,11 @@ MESSAGE_LOG="all_messages_log" if deployed: ALLOW_REGISTER = False + FULL_NAVBAR = False NOT_LOGGED_IN_REDIRECT = 'django.contrib.auth.views.login' else: ALLOW_REGISTER = True + FULL_NAVBAR = True NOT_LOGGED_IN_REDIRECT = 'zephyr.views.accounts_home' # For testing, you may want to have emails be printed to the console. diff --git a/templates/zephyr/content_base.html b/templates/zephyr/content_base.html index e109ee022a..caa3cbe1c7 100644 --- a/templates/zephyr/content_base.html +++ b/templates/zephyr/content_base.html @@ -9,9 +9,11 @@ {% block content %} diff --git a/zephyr/context_processors.py b/zephyr/context_processors.py new file mode 100644 index 0000000000..6b7d0bf1fd --- /dev/null +++ b/zephyr/context_processors.py @@ -0,0 +1,4 @@ +from django.conf import settings + +def add_settings(context): + return { 'full_navbar': settings.FULL_NAVBAR } diff --git a/zephyr/views.py b/zephyr/views.py index b0c85b37bc..85084394f3 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -106,9 +106,9 @@ def register(request): login(request, authenticate(username=email, password=password)) return HttpResponseRedirect(reverse('zephyr.views.home')) - return render(request, 'zephyr/register.html', { - 'form': form, 'company_name': company_name, 'email': email, 'key': key, - }) + return render_to_response('zephyr/register.html', + { 'form': form, 'company_name': company_name, 'email': email, 'key': key }, + context_instance=RequestContext(request)) def login_page(request, **kwargs): template_response = django_login_page(request, **kwargs)