Re: [Django] #25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9

2016-09-04 Thread Django
#25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9
---+--
 Reporter:  stephanm   |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Uncategorized  |  Version:  1.9
 Severity:  Normal |   Resolution:  needsinfo
 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 aaugustin):

 I filed #27176 to improve the behavior in this area, but I'm not sure
 that's the problem you were hitting.

--
Ticket URL: 
Django 
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.53f4e2e4ec952aca69ca52b5e071ddf1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9

2015-12-04 Thread Django
#25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9
---+--
 Reporter:  stephanm   |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Uncategorized  |  Version:  1.9
 Severity:  Normal |   Resolution:  needsinfo
 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 aaugustin):

 This is the expected behavior. You need to setup Django before importing
 models.

 To avoid the extra `if __name__ == '__main__'` I think we should make
 `django.setup()` idempotent.

 I'll write to the DevelopersMailingList about this idea.

--
Ticket URL: 
Django 
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.55fd9310315ca3ba3f4cf216de014b3d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9

2015-12-04 Thread Django
#25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9
---+--
 Reporter:  stephanm   |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Uncategorized  |  Version:  1.9
 Severity:  Normal |   Resolution:  needsinfo
 Keywords: | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by timgraham):

 * status:  new => closed
 * resolution:   => needsinfo


--
Ticket URL: 
Django 
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.3f4dd2a31bfac4fd0470162028f6f865%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9

2015-12-04 Thread Django
#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: 
Django 
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.


Re: [Django] #25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9

2015-12-04 Thread Django
#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 bmispelon):

 Hi,

 We can't really reproduce your issue without the definition of your
 models.
 Is there a way you could provide them (ideally, a simplified version that
 still reproduces the issue).

 Thanks.

--
Ticket URL: 
Django 
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.99b2750325f34e6de14e8e38cd426003%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #25864: AppRegistryNotReady exception since update from 1.8.7 to 1.9

2015-12-04 Thread Django
#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
---+--
Changes (by stephanm):

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


--
Ticket URL: 
Django 
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.4d0070e3c83bd602c439e1b4392f7c1a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.