On 6 led, 17:32, John-Scott <[email protected]> wrote:
>    While models.get_apps() imports payment.models, it attempts to import
>    OrderPayment from satchmo_store.shops, which fails for reasons not clear to
>    me.

The last line in stack trace tries to import module
   satchmo_store.shop.models
which is currently not partially imported because it stops eight
levels in
/home/web/example/env/src/satchmo/satchmo/apps/satchmo_store/shop/
models.py", line 1232, in OrderPaymentBase
and required name OrderPayment is below on that line.
This is recursive dependency.

Something changed the order of module import.
Django usually imports module settings then all INSTALLED_APPS.models
modules and then urls and other things.

All models should be loaded by django before admin.autodiscover()
You can test it and try repair by this code
#
import sys
from django.conf import settings
notloaded =
list(set(settings.INSTALLED_APPS).difference([x.replace('.models','')
for x in sys.modules.keys() if x.endswith('.models')]+
['satchmo_utils.thumbnail']))
# Usually only app satchmo_utils.thumbnail which has no models.py is
not loaded and is excluded from the list.
if notloaded:
    print notloaded   # something better than print
    # you can now try to import listed app.modules or
    # if no models are loaded, you can try load them all by some first
usage of database
    from django.contrib.sites.models import Site
    current_site = Site.objects.get_current()
admin.autodiscover()

What about to try random short delay between new process startup (not
yet full initialised) and the first request? Then probably an issue
for django or mod_wsgi code.

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to