#25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9
-------------------------------+--------------------------------------
     Reporter:  stephanm       |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Uncategorized  |                  Version:  1.9
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by stephanm):

 I tried but I didn't get it :-(

 Actually I use the following workaround:
 {{{#!py
 # at the beginning of the file before the first import:
 if __name__ == "__main__":
     import django
     django.setup()
 # now the imports ...
 from myapp.models import MyModel1 # here is the exception
 ...
 if __name__ == "__main__":
     # skipped here ...
     #    import django
     #    django.setup()
     # my code follows
 }}}

 I can live with this so you can close the ticket it if you like,
 if I find a way to reproduce it in a simple "example" I will open it
 again.

--
Ticket URL: <https://code.djangoproject.com/ticket/25864#comment:3>
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/066.0470383a1d136f1fbd957d089f44d0b1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to