Created
January 4, 2017 16:37
-
-
Save ddahan/ae8bb4756bf8cda76eb7edf2eb7bb95a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# models.py | |
class User(AbstractBaseUser, PermissionsMixin): | |
# ... | |
def is_owner(self): | |
''' Retourne True si cet utilisateur est lié à un BizProfile ''' | |
try: | |
self.bizprofile | |
return True | |
except: | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment