#19975 closed Bug (wontfix)

Catching ImportError and raising SiteProfileNotAvailable in auth.models makes it tricky to figure out missing modules

Reported by: hansel@… Owned by: nobody
Component: contrib.auth Version: 1.5-rc-2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


Catching all ImportError exceptions in django.contrib.auth.models.get_profile means it can be impossible to debug missing modules. The only solution seems to be modifying the source, seeing the underlying exception, then changing it back.

It doesn't seem very user friendly to give an exception that doesn't give the user any clue as to what the problem actually is.

Attachments (0)

Change History (1)

comment:1 Changed 16 months ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

You're probably right. However, get_profile is deprecated in Django 1.6 and will be removed in Django 1.7. We generally don't improve code in deprecated sections, unless it's serious (security/data loss/crasher). Thanks for the report anyway.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.