Opened 8 years ago

Closed 8 years ago

#12366 closed (invalid)


Reported by: johnnyl Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords: admin split AUTH_PROFILE_MODULE path
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


If you use the above style (an extra '.' signfying the path of the app)

Because there is no extra parsing of the path (it only uses *1* split) you get the following error:

Request Method: POST
Request URL:
Exception Type: ValueError
Exception Value:

too many values to unpack

Source Code:
C:\Python25\lib\site-packages\django\contrib\auth\ in get_profile

  1. SiteProfileNotAvailable if this site does not allow profiles.
  2. """
  3. if not hasattr(self, '_profile_cache'):
  4. from django.conf import settings
  5. if not getattr(settings, 'AUTH_PROFILE_MODULE', False):
  6. raise SiteProfileNotAvailable
  7. try:
  1. app_label, model_name = settings.AUTH_PROFILE_MODULE.split('.') ...
  1. model = models.get_model(app_label, model_name)
  2. self._profile_cache = model._default_manager.get(
  3. self._profile_cache.user = self
  4. except (ImportError, ImproperlyConfigured):
  5. raise SiteProfileNotAvailable
  6. return self._profile_cache

Best Regards,

Change History (1)

comment:1 Changed 8 years ago by Alex Gaynor

Resolution: invalid
Status: newclosed

AUTH_PROFILE_MODULE should be "appname.model" as specified in the docs, not the Python Path to the mode.

Note: See TracTickets for help on using tickets.
Back to Top