Opened 19 years ago

Closed 18 years ago

Last modified 18 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

Description

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'])

Sean

Attachments (1)

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

Download all attachments as: .zip

Change History (2)

by jafo@…, 19 years ago

Attachment: generic-imports.patch added

Patch implementing the changes proposed.

comment:1 by Adrian Holovaty, 18 years ago

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