#25984: Incorrect error message in ModelBase.__new__
-------------------------------------+-------------------------------------
     Reporter:  knbk                 |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  1.9
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by knbk):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> The
> [https://github.com/django/django/blob/master/django/db/models/base.py#L99
> 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.

New description:

 The
 
[https://github.com/django/django/blob/91cd4d8e8c1e8593fc091abc11e05fa5d9514601/django/db/models/base.py#L99
 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.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/25984#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.c3f25ba36a93f04c7b027d3dc275b849%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to