私はこの同じ問題を抱えていた、とcorsheaders
アプリのために特別にpython manage.py makemigrations
を呼び出すことによってそれを解決:
$ python manage.py makemigrations corsheaders
$ python manage.py migrate
私は何を私の場合で起こったことは、1.9へのDjango 1.8からアップグレードした後、という初期だったと思いますDBを更新したときにマイグレーションが適用されることはありませんでした。
私はcorsheaders
アプリがpython manage.py migrate
のApply all migrations
出力にリストされていなかったことに気づいてそれを見つけ出し:
$ python manage.py makemigrations corsheaders
Migrations for 'corsheaders':
0001_initial.py:
- Create model CorsModel
:実際には最初の移行を作成しますけれども
corsheaders
のためのマニュアルの移行を実行している
$ python manage.py migrate
Operations to perform:
Apply all migrations: sessions, admin, xyz, auth, contenttypes
Running migrations:
No migrations to apply.
これを実行すると、migrate
は出力にcorsheaders
を表示し、正常に移行を正常に適用します。
$ python manage.py migrate
Operations to perform:
Apply all migrations: corsheaders, sessions, admin, xyz, auth, contenttypes
Running migrations:
Rendering model states... DONE
Applying corsheaders.0001_initial... OK
現在のバージョンのcorsheadersがインストールされていますか? –
django-cors-headers == 1.1.0 – user3897818
この質問に正解を選んでください。 @ myk-willisには正しいものがあるようです。 – daveslab