Skip to content

Instantly share code, notes, and snippets.

@gitumarkk
Created February 27, 2014 14:58
Show Gist options
  • Save gitumarkk/9251686 to your computer and use it in GitHub Desktop.
Save gitumarkk/9251686 to your computer and use it in GitHub Desktop.
Is Paid check.
Profile:
is_parent = ....
def family_is_paid(self):
try:
parent = self.profile_parent.family
if family.is_paid:
return True
except ObjectDoesNotExist:
return False
return False
{{ if user.profile_user.family_is_paid }}
{{ endif }}
if request.user.profile_user.family_is_paid:
return function()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment