Posting this in case that someone lands on this problem and none of the answers above have worked.
This is an addition to one of the solutions that may or may not solve your problem:
The solution being: make sure that you do the migrate command first before anything else!
So in the usual case, you upload your code to the cloud, which could be AWS. You do the usual docker-compose commands right, well you should do exactly as the following first:
Do the following steps:
docker-compose -f production.yml build
then docker-compose -f production.yml run --rm django python manage.py migrate
And then after that you can now run the docker instance via docker-compose -f production.yml up
or docker-compose -f production.yml up -d
(search on google what that means)
--
If you've already run the instance before migrating, then just stop the docker instance that you're running and remove it. A handy tutorial for docker commands I've found is this: https://www.thegeekdiary.com/how-to-list-start-stop-delete-docker-containers/
python manage.py syncdb
after making the change to settings? – Foremostpython manage.py syncdb
is deprecated for django 1.11 (and i think 1.9 or 1.10 too). Usepython manage.py migrate
aftermakemigrations
instead – Stranger