Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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(),
'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