def get_user_model():
 try:
  model = get_model(AUTH_USER_APP_LABEL, AUTH_USER_MODEL_NAME)
 except LookupError:
  raise ImproperlyConfigured(("AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings.AUTH_USER_MODEL))
 core_fields = set([f.name for f in User._meta.fields])
 model_fields = set([f.name for f in model._meta.fields])
 new_fields = model_fields.difference(core_fields)
 model._meta.has_additional_fields = (len(new_fields) > 0)
 model._meta.additional_fields = new_fields
 return model

def get_user_model ( ) : try : model = get_model ( AUTH_USER_APP_LABEL , AUTH_USER_MODEL_NAME ) except LookupError : raise ImproperlyConfigured ( ( "AUTH_USER_MODEL refers to model '%s' that has not been installed" % settings . AUTH_USER_MODEL ) ) core_fields = set ( [ f . name for f in User . _meta . fields ] ) model_fields = set ( [ f . name for f in model . _meta . fields ] ) new_fields = model_fields . difference ( core_fields ) model . _meta . has_additional_fields = ( len ( new_fields ) > 0 ) model . _meta . additional_fields = new_fields return model
returns the user model that is active in this project .