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?
migrate executes those SQL commands in the database file. So after executing migrate all the tables of your installed apps are created in your database file. You can confirm this by installing SQLite browser and opening db.
Create or update a model. Run ./manage.py makemigrations <app_name> Run ./manage.py migrate to migrate everything or ./manage.py migrate <app_name> to migrate an individual app. Repeat as necessary.
makemigrations is responsible for packaging up your model changes into individual migration files - analogous to commits - and migrate is responsible for applying those to your database.
If you've installed 1.6, you should use the 1.6 tutorial, not the one for the development version.
First Step, Install South:
pip install south
Second Step, Add South to INSTALLED APPS in settings
INSTALLED_APPS = ( ..., 'south' )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With