Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#496 closed defect (fixed)

Better error messages when using generic views.

Reported by: jafo@… Owned by: Adrian Holovaty
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: no UI/UX: no


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@… 14 years ago.
Patch implementing the changes proposed.

Download all attachments as: .zip

Change History (2)

Changed 14 years ago by jafo@…

Attachment: generic-imports.patch added

Patch implementing the changes proposed.

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

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