| 1 | | I used virtualenvwrapper==3.1<br> |
| 2 | | $mkvirtualenv mysite<br> |
| 3 | | $workon mysite<br> |
| 4 | | (mysite)$pip install Django-1.4c2.tar.gz<br> |
| 5 | | (mysite)$pip install south<br> |
| 6 | | (mysite)$tar zxvf MySQL-python-1.2.3.tar.gz<br> |
| 7 | | (mysite)$cd MySQL-python-1.2.3<br> |
| 8 | | (mysite)$vi site.cfg <br> |
| 9 | | uncommented mysql_config and changed -> /usr/local/mysql/bin/mysql_config<br> |
| 10 | | changed registry_key -> SOFTWARE\MySQL AB\MySQL Server 5.1<br> |
| 11 | | (mysite)$python setup.py build<br> |
| 12 | | (mysite)$python setup install<br> |
| 13 | | <br> |
| 14 | | (mysite)$pip freeze<br> |
| 15 | | Django==1.4c2<br> |
| 16 | | MySQL-python==1.2.3<br> |
| 17 | | South==0.7.3<br> |
| 18 | | wsgiref==0.1.2<br> |
| 19 | | <br> |
| 20 | | (mysite)$django-admin.py startproject mysite<br> |
| 21 | | (mysite)$./manage.py startapp polls<br> |
| 22 | | add something to models.py<br> |
| 23 | | --------------------------------------------------------------------------<br> |
| 24 | | from django.db import models<br> |
| 25 | | <br> |
| 26 | | class Poll(models.Model):<br> |
| 27 | | question = models.CharField(max_length=200)<br> |
| 28 | | --------------------------------------------------------------------------<br> |
| 29 | | created a mysql database 'mysite' with utf-8 unicode<br> |
| 30 | | changed database to mysql<br> |
| 31 | | added south and polls to INSTALLED_APPS<br> |
| 32 | | USE_TZ is True by default<br> |
| 33 | | (mysite)$python manage.py syncdb<br> |
| 34 | | create superuser : no<br> |
| 35 | | (mysite)$python manage convert_to_south polls<br> |
| 36 | | got this<br> |
| 37 | | ------------------------------------------------------------------------------<br> |
| 38 | | Creating migrations directory at '/Users/don/Workspaces/test_work/mysite/polls/migrations'...<br> |
| 39 | | Creating __init__.py in '/Users/don/Workspaces/test_work/mysite/polls/migrations'...<br> |
| 40 | | + Added model polls.Poll<br> |
| 41 | | Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate polls<br> |
| 42 | | - Soft matched migration 0001 to 0001_initial.<br> |
| 43 | | Running migrations for polls:<br> |
| 44 | | - Migrating forwards to 0001_initial.<br> |
| 45 | | > polls:0001_initial<br> |
| 46 | | (faked)<br> |
| 47 | | /Users/don/.virtualenvs/mysite/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-03-21 02:00:29.098454) while time zone support is active.<br> |
| 48 | | RuntimeWarning)<br> |
| 49 | | <br> |
| 50 | | App 'polls' converted. Note that South assumed the application's models matched the database<br> |
| 51 | | (i.e. you haven't changed it since last syncdb); if you have, you should delete the polls/migrations<br> |
| 52 | | directory, revert models.py so it matches the database, and try again.<br> |
| 53 | | <br> |
| 54 | | ------------------------------------------------------------------------------<br> |
| 55 | | and everytime I changed Poll model and migrate it always got this warning<br> |
| 56 | | (mysite)$python manage.py schemamigration polls --auto<br> |
| 57 | | (mysite)$python manage.py migrate polls<br> |
| 58 | | ------------------------------------------------------------------------------<br> |
| 59 | | Running migrations for polls:<br> |
| 60 | | - Migrating forwards to 0002_auto__add_field_poll_name.<br> |
| 61 | | > polls:0002_auto__add_field_poll_name<br> |
| 62 | | /Users/don/.virtualenvs/mysite/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-03-21 02:05:13.321314) while time zone support is active.<br> |
| 63 | | RuntimeWarning)<br> |
| 64 | | - Loading initial data for polls.<br> |
| 65 | | Installed 0 object(s) from 0 fixture(s)<br> |
| 66 | | ------------------------------------------------------------------------------<br> |
| 67 | | I pip install pytz got nothing help.<br> |
| 68 | | But when I created a new virtualenv with django1.3.1, there is no warning at all.<br> |
| 69 | | like this<br> |
| 70 | | ------------------------------------------------------------------------------<br> |
| 71 | | (mysite2)don$ python manage.py schemamigration polls --auto<br> |
| 72 | | + Added field title on polls.Poll<br> |
| 73 | | Created 0002_auto__add_field_poll_title.py. You can now apply this migration with: ./manage.py migrate polls<br> |
| 74 | | (mysite2)don$ python manage.py migrate pollsRunning migrations for polls:<br> |
| 75 | | - Migrating forwards to 0002_auto__add_field_poll_title.<br> |
| 76 | | > polls:0002_auto__add_field_poll_title<br> |
| 77 | | - Loading initial data for polls.<br> |
| 78 | | No fixtures found.<br> |
| 79 | | <br> |
| 80 | | ------------------------------------------------------------------------------<br> |
| | 1 | I used virtualenvwrapper==3.1[[BR]] |
| | 2 | $mkvirtualenv mysite[[BR]] |
| | 3 | $workon mysite[[BR]] |
| | 4 | (mysite)$pip install Django-1.4c2.tar.gz[[BR]] |
| | 5 | (mysite)$pip install south[[BR]] |
| | 6 | (mysite)$tar zxvf MySQL-python-1.2.3.tar.gz[[BR]] |
| | 7 | (mysite)$cd MySQL-python-1.2.3[[BR]] |
| | 8 | (mysite)$vi site.cfg [[BR]] |
| | 9 | uncommented mysql_config and changed -> /usr/local/mysql/bin/mysql_config[[BR]] |
| | 10 | changed registry_key -> SOFTWARE\MySQL AB\MySQL Server 5.1[[BR]] |
| | 11 | (mysite)$python setup.py build[[BR]] |
| | 12 | (mysite)$python setup install[[BR]] |
| | 13 | [[BR]] |
| | 14 | (mysite)$pip freeze[[BR]] |
| | 15 | Django==1.4c2[[BR]] |
| | 16 | MySQL-python==1.2.3[[BR]] |
| | 17 | South==0.7.3[[BR]] |
| | 18 | wsgiref==0.1.2[[BR]] |
| | 19 | [[BR]] |
| | 20 | (mysite)$django-admin.py startproject mysite[[BR]] |
| | 21 | (mysite)$./manage.py startapp polls[[BR]] |
| | 22 | add something to models.py[[BR]] |
| | 23 | --------------------------------------------------------------------------[[BR]] |
| | 24 | from django.db import models[[BR]] |
| | 25 | [[BR]] |
| | 26 | class Poll(models.Model):[[BR]] |
| | 27 | question = models.CharField(max_length=200)[[BR]] |
| | 28 | --------------------------------------------------------------------------[[BR]] |
| | 29 | created a mysql database 'mysite' with utf-8 unicode[[BR]] |
| | 30 | changed database to mysql[[BR]] |
| | 31 | added south and polls to INSTALLED_APPS[[BR]] |
| | 32 | USE_TZ is True by default[[BR]] |
| | 33 | (mysite)$python manage.py syncdb[[BR]] |
| | 34 | create superuser : no[[BR]] |
| | 35 | (mysite)$python manage convert_to_south polls[[BR]] |
| | 36 | got this[[BR]] |
| | 37 | ------------------------------------------------------------------------------[[BR]] |
| | 38 | Creating migrations directory at '/Users/don/Workspaces/test_work/mysite/polls/migrations'...[[BR]] |
| | 39 | Creating __init__.py in '/Users/don/Workspaces/test_work/mysite/polls/migrations'...[[BR]] |
| | 40 | + Added model polls.Poll[[BR]] |
| | 41 | Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate polls[[BR]] |
| | 42 | - Soft matched migration 0001 to 0001_initial.[[BR]] |
| | 43 | Running migrations for polls:[[BR]] |
| | 44 | - Migrating forwards to 0001_initial.[[BR]] |
| | 45 | > polls:0001_initial[[BR]] |
| | 46 | (faked)[[BR]] |
| | 47 | /Users/don/.virtualenvs/mysite/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-03-21 02:00:29.098454) while time zone support is active.[[BR]] |
| | 48 | RuntimeWarning)[[BR]] |
| | 49 | [[BR]] |
| | 50 | App 'polls' converted. Note that South assumed the application's models matched the database[[BR]] |
| | 51 | (i.e. you haven't changed it since last syncdb); if you have, you should delete the polls/migrations[[BR]] |
| | 52 | directory, revert models.py so it matches the database, and try again.[[BR]] |
| | 53 | [[BR]] |
| | 54 | ------------------------------------------------------------------------------[[BR]] |
| | 55 | and everytime I changed Poll model and migrate it always got this warning[[BR]] |
| | 56 | (mysite)$python manage.py schemamigration polls --auto[[BR]] |
| | 57 | (mysite)$python manage.py migrate polls[[BR]] |
| | 58 | ------------------------------------------------------------------------------[[BR]] |
| | 59 | Running migrations for polls:[[BR]] |
| | 60 | - Migrating forwards to 0002_auto__add_field_poll_name.[[BR]] |
| | 61 | > polls:0002_auto__add_field_poll_name[[BR]] |
| | 62 | /Users/don/.virtualenvs/mysite/lib/python2.7/site-packages/django/db/models/fields/__init__.py:808: RuntimeWarning: DateTimeField received a naive datetime (2012-03-21 02:05:13.321314) while time zone support is active.[[BR]] |
| | 63 | RuntimeWarning)[[BR]] |
| | 64 | - Loading initial data for polls.[[BR]] |
| | 65 | Installed 0 object(s) from 0 fixture(s)[[BR]] |
| | 66 | ------------------------------------------------------------------------------[[BR]] |
| | 67 | I pip install pytz got nothing help.[[BR]] |
| | 68 | But when I created a new virtualenv with django1.3.1, there is no warning at all.[[BR]] |
| | 69 | like this[[BR]] |
| | 70 | ------------------------------------------------------------------------------[[BR]] |
| | 71 | (mysite2)don$ python manage.py schemamigration polls --auto[[BR]] |
| | 72 | + Added field title on polls.Poll[[BR]] |
| | 73 | Created 0002_auto__add_field_poll_title.py. You can now apply this migration with: ./manage.py migrate polls[[BR]] |
| | 74 | (mysite2)don$ python manage.py migrate pollsRunning migrations for polls:[[BR]] |
| | 75 | - Migrating forwards to 0002_auto__add_field_poll_title.[[BR]] |
| | 76 | > polls:0002_auto__add_field_poll_title[[BR]] |
| | 77 | - Loading initial data for polls.[[BR]] |
| | 78 | No fixtures found.[[BR]] |
| | 79 | [[BR]] |
| | 80 | ------------------------------------------------------------------------------[[BR]] |