1👍
So I actually figured out what was causing this behavior. In designing my gulp tasks, I restructured the project folder, putting all of my django-created files inside of a src
subdirectory.
I did this thinking it’d be easier to watch my app files for changes this way without unintentionally triggering my watch tasks when gulpfile.js
or files in bower_components
were modified. (Ultimately, it didn’t matter, since my globs were more specific than just the django project root.)
This wouldn’t have been a problem except that settings.DATABASES['default']['NAME']
was the relative path project.db
. As a result, when I ran ./manage.py migrate
from within the /src
directory, it performed the migrations on /src/project.db
. And when I ran src/manage.py migrate
from the parent directory, the migrations were performed on /project.db
. The djangocms app itself was using the latter, while I’d been performing all of my migrations on the former.
So the lessons here are:
- Make sure your sqlite file is specified using an absolute path.
- When you encounter seemingly inexplicable migration issues, check to make sure you don’t have multiple .db files floating around in your workspace.
- Django.core.validators is not a package
- Problems with migrations
- Django cms Error during Template rendering cms_toolbar