healthchecks/hc/payments/context_processors.py
2016-05-14 12:36:40 +03:00

13 lines
322 B
Python

from django.conf import settings
def payments(request):
show_pricing = settings.USE_PAYMENTS
if show_pricing and request.user.is_authenticated():
profile = request.user.profile
if profile.id != profile.current_team_id:
show_pricing = False
return {'show_pricing': show_pricing}