Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#496 closed defect (fixed)

Better error messages when using generic views.

Reported by: jafo@… Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I had problems, and it sounds like it's fairly common, figuring out how to pass information to the generic views. I propose the following patch which reports an improperly set app_label as:

ImportError: Unable to import app_label "poll": No module named poll

And if the module_name is bad, it reports:

ImportError: Unable to import module_name "user": No module named user (available choices: ['Event', 'User', 'View', '_MODELS', 'builtins', 'doc', 'file', 'name', 'events', 'meta', 'users', 'views'])


Attachments (1)

generic-imports.patch (981 bytes) - added by jafo@… 10 years ago.
Patch implementing the changes proposed.

Download all attachments as: .zip

Change History (2)

Changed 10 years ago by jafo@…

Patch implementing the changes proposed.

comment:1 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

These strange import errors should no longer be a problem now that magic-removal has merged.

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