This file contains 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
from django.apps import AppConfig | |
class TestappConfig(AppConfig): | |
default_auto_field = 'django.db.models.BigAutoField' | |
name = 'testapp' | |
def ready(self): | |
import djwto.tokens as tokens | |
def new_process_user(user): | |
return { | |
user.USERNAME_FIELD: user.get_username(), | |
'email': user.email, | |
'id': user.pk, | |
'perms': tokens.process_perms(user) | |
} | |
tokens.process_user = new_process_user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment