Reputation: 141
I have installed on Win7 portable Python 2.7.5.1 and Django 1.6.
I followed the first polls tutorial instructions and got an error in the migrate stage, python manage.py migrate
:
C:\Natan\Dev\Portable Python 2.7.5.1\App\Scripts\mysite>..\..\python.exe manage.py migrate
Unknown command: 'migrate'
Type 'manage.py help' for usage.
Any idea?
Upvotes: 14
Views: 34506
Reputation: 1575
If you are using Django older versions before 1.7 then you should sync database by
python manage.py syncdb
while in new versions after 1.7 syncdb is replaced by migration. So for syncdb in new django version is replaced by :-
python manage.py makemigrations
python manage.py migrate
for more type:-
python manage.py help
Upvotes: 0
Reputation: 81
First Step, Install South:
pip install south
Second Step, Add South to INSTALLED APPS in settings
INSTALLED_APPS = ( ..., 'south' )
Upvotes: 8
Reputation: 1210
All-
This is likely caused largely by following the 1.7 (DEV version!) tutorial when we all get the last stable version (1.6!) installed by pip.
It would not appear migrate is even a part of 1.7 in general! Will:
python manage.py syncdb
Solve your problems?
So pls either follow the tutorial for the last stable version of django: https://docs.djangoproject.com/en/1.6/intro/tutorial01/
Or follow the instructions to install the dev version of Django.
Dear Django team, You guys are awesome. The JS developer is very impressed. But PLEASE resolve the discrepancy above. Maybe default to 1.6 docs and put in red letters: Dev version here?
Thank you.
Upvotes: 4
Reputation: 5187
Migrate will be a native command in 1.7 (which is the version you read the tutorial pages from).
For older versions, you'll have to install the third party app"South".
Upvotes: 4
Reputation: 600041
If you've installed 1.6, you should use the 1.6 tutorial, not the one for the development version.
Upvotes: 17