Opened 8 years ago

Last modified 8 years ago

#25984 closed Cleanup/optimization

Incorrect error message in ModelBase.__new__ — at Initial Version

Reported by: Marten Kenbeek Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The RuntimeError in ModelBase.__new__ says:

... or else was imported before its application was loaded.

In 1.9 all applications have to be loaded before you can import any models, otherwise an AppRegistryNotReady exception is raised before this error is reached. This error is only reached if the app is not in INSTALLED_APPS. The message should be changed to reflect that.

Change History (0)

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