-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migration chicken-egg problem #29
Comments
The workaround is of course to remove the template loader at initial migration time. But in some automated environments that is tedious. IMHO no db queries or cache access should happen at import time. |
I get the same problem :( But removing the template loader will not help here. |
I can't seem to reproduce this problem - using a fresh django 1.9 project with django-multisite 1.3.1 and these settings: https://gist.github.com/mghughes/6710f72d5c6ad6ffb6e4c9857ced7fe3 Since there are multiple people with this problem, am I missing something obvious? Or can you provide more information about what you're doing differently? |
Stepping in because I've run across this error now. This error can occur if you use an app which attempts to load a template on startup. I'm not sure how many apps do this regularly, but one prominent one is django-cms. It happens when it calls There is no way to prevent this error from occurring as far as I can tell. I've looked at all of the involved code and apart from setting django-cms to catch all exceptions in its Obviously, this means that doing a standard test which starts with a completely empty database will not work unless you disable multisite during testing. One possibility is something like this (untested):
And then, in a test file:
|
Can't run
python manage.py migrate
on a fresh database, becausemultisite.template.loaders.filesystem
causes a db query to thedjango_site
table.The text was updated successfully, but these errors were encountered: