1
0
Fork 0
satnogs-network/network/base/context_processors.py

19 lines
545 B
Python
Raw Normal View History

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')}
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': ''}