You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

profile.py 443B

1234567891011121314
  1. from django.conf import settings
  2. from django.core.exceptions import ImproperlyConfigured
  3. from django.db.models import get_model
  4. def get_profile_class():
  5. """
  6. Return the profile model class
  7. """
  8. app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.')
  9. profile_class = get_model(app_label, model_name)
  10. if not profile_class:
  11. raise ImproperlyConfigured("Can't import profile model")
  12. return profile_class