#7198: improved error message on apps without models.py files -------------------------------------+------------------------------------- Reporter: gav | Owner: justinlilly Type: Bug | Status: reopened Milestone: | Component: Core (Other) Version: SVN | Severity: Normal Resolution: | Keywords: management command Triage Stage: Ready for | sql sqlall checkin | Has patch: 1 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------+------------------------------------- Changes (by gabrielhurley):
* status: closed => reopened * resolution: fixed => * easy: 1 => 0 Comment: Close, but no cigar. First, the error message is missing the `app_label` for string interpolation, so the error message is wrong. Second, this absolutely needs a unit test. Unfortunately, that's very difficult due to the way the test runner loads test apps. In fact, it's incapable of loading a test app without a models.py file. So instead a test case can be dropped into a different app with a models.py file which can then attempt to load an app without a models.py file and catch the exception. I'll attach a patch with both fixes momentarily for review. -- Ticket URL: <https://code.djangoproject.com/ticket/7198#comment:32> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.