2015-04-09 06:13:05 -06:00
|
|
|
from django.conf import settings
|
|
|
|
from django.template.loader import render_to_string
|
|
|
|
|
|
|
|
|
|
|
|
def analytics(request):
|
|
|
|
"""Returns analytics code."""
|
|
|
|
if settings.ENVIRONMENT == 'production':
|
2017-02-21 14:52:39 -07:00
|
|
|
return {'analytics_code': render_to_string('includes/analytics.html')}
|
2015-04-09 06:13:05 -06:00
|
|
|
else:
|
|
|
|
return {'analytics_code': ''}
|
2015-05-10 04:31:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
def stage_notice(request):
|
|
|
|
"""Displays stage notice."""
|
|
|
|
if settings.ENVIRONMENT == 'stage':
|
|
|
|
return {'stage_notice': render_to_string('includes/stage_notice.html')}
|
|
|
|
else:
|
|
|
|
return {'stage_notice': ''}
|