def django_auth_setup():
 global DJANGO_AUTH_CLASS
 if (DJANGO_AUTH_CLASS is not None):
  return
 if ('^model' in __opts__['external_auth']['django']):
  django_model_fullname = __opts__['external_auth']['django']['^model']
  django_model_name = django_model_fullname.split('.')[(-1)]
  django_module_name = '.'.join(django_model_fullname.split('.')[0:(-1)])
  __import__(django_module_name, globals(), locals(), 'SaltExternalAuthModel')
  DJANGO_AUTH_CLASS_str = 'django_auth_module.{0}'.format(django_model_name)
  DJANGO_AUTH_CLASS = eval(DJANGO_AUTH_CLASS_str)
 if (django.VERSION >= (1, 7)):
  django.setup()

def django_auth_setup ( ) : global DJANGO_AUTH_CLASS if ( DJANGO_AUTH_CLASS is not None ) : return if ( '^model' in __opts__ [ 'external_auth' ] [ 'django' ] ) : django_model_fullname = __opts__ [ 'external_auth' ] [ 'django' ] [ '^model' ] django_model_name = django_model_fullname . split ( '.' ) [ ( - 1 ) ] django_module_name = '.' . join ( django_model_fullname . split ( '.' ) [ 0 : ( - 1 ) ] ) __import__ ( django_module_name , globals ( ) , locals ( ) , 'SaltExternalAuthModel' ) DJANGO_AUTH_CLASS_str = 'django_auth_module.{0}' . format ( django_model_name ) DJANGO_AUTH_CLASS = eval ( DJANGO_AUTH_CLASS_str ) if ( django . VERSION >= ( 1 , 7 ) ) : django . setup ( )
prepare the connection to the django authentication framework .