<s> from django . apps import AppConfig <EOL> from django . contrib import auth <EOL> from django . contrib . auth . management import create_permissions <EOL> from django . db . models . signals import post_migrate <EOL> def lazy_permission_creation ( ** kwargs ) : <EOL> from . models import PermissionsMixin <EOL> if issubclass ( auth . get_user_model ( ) , PermissionsMixin ) : <EOL> return <EOL> create_permissions ( ** kwargs ) <EOL> class GAuthDatastoreConfig ( AppConfig ) : <EOL> name = "<STR_LIT>" <EOL> verbose_name = "<STR_LIT>" <EOL> def ready ( self ) : <EOL> post_migrate . disconnect ( <EOL> dispatch_uid = "<STR_LIT>" ) <EOL> post_migrate . connect ( <EOL> lazy_permission_creation , <EOL> sender = self , <EOL> dispatch_uid = "<STR_LIT>" , <EOL> ) </s>
