def issue_token(self, owner=None): from authentication.models import Token token = Token(user=self, owner=owner) token.save() return token.key