healthchecks/hc/payments/context_processors.py
Pēteris Caune 965e32884b Django 1.10
2016-08-29 17:54:53 +03:00

13 lines
348 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.current_team_id and profile.current_team_id != profile.id:
show_pricing = False
return {'show_pricing': show_pricing}