Created
June 30, 2021 15:19
-
-
Save WillianFuks/efd3f971573067fe01d024800fdc1de9 to your computer and use it in GitHub Desktop.
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