Have you tried the Django dev mailing list? You're dealing with the deep internals of Django, the black magic of which us lowly end users take for granted.
You may have better luck there, since they have a much better understanding of the gears and gizmos behind the scenes.
-James
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f5271566-56ce-4171-a21e-fa24bbd73451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Breaking it down:
- Django.setup wants to load all apps, and calls apps.populate
- Django-cms plugins register themselves at load time
- Django-cms plugin registration involves loading templates
- Django-multisite provides a template loader (for per-site templates)
- Django-multisite also monkey-patches Sites' cache (normally a dict) with a wrapper around a django cache
- The django-multisite template loader fetches the current site from cache when loading template
I could break the cycle any number of places, but it seems to me that all the apps are doing reasonable things (monkey patching aside), and django shouldn't be calling apps.populate to unpickle a model. Perhaps that is unavoidable?
- Django's LocMemCache backend fetches a pickled model from cache
- It is implicitly unpickled by django.db.models.base.Model which calls model_unpickle
- model_unpickle tests if apps.ready is true and if not, calls apps.populate