Появилась официальная инструкция по установке Django-LFS под винду
http://code.google.com/p/django-lfs/wiki/InstallationWindowsTestВчера решил поставить лфску на другую машину и заодно написать пошаговую инструкцию на русском.
в новой и инструкции есть пункт:
13.(optional for testing and demos unless you need to migrate) Download South from http://www.aeracode.org/releases/south then python setup.py install
Для чего этот South нужен?
По скольку привык использовать mysql и phpMyAdmin девнвере
то установил mysql, но по скольку официального дистрибутива MySQL под python версии 2.6 не существует то устанавливаем стороннюю сборку дистрибутива, от сюда
http://www.codegood.com/archives/4Далее все вроде встало хорошо но при создании базы данных проявляется следующие предуприждение
I:\Python26\Lib\site-packages\MySQLdb\__init__.py:34: DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
но это не все, создаются не все таблицы
Synced:
> django.contrib.admin
> django.contrib.auth
> django.contrib.contenttypes
> django.contrib.sessions
> django.contrib.sites
> django.contrib.flatpages
> pagination
> reviews
> tagging
> lfs.export
> lfs.portlet
> lfs.search
> south
Not synced (use migrations):
- portlets
- lfs.core
- lfs.cart
- lfs.catalog
- lfs.criteria
- lfs.customer
- lfs.marketing
- lfs.order
- lfs.page
- lfs.payment
- lfs.shipping
- lfs.tax
- paypal.standard.ipn
- paypal.standard.pdt
(use ./manage.py migrate to migrate these)
Затем я выполняю команду которую мне предлагают python manage.py migrate
она выдает следующие:
Traceback (most recent call last):
File "I:\Python26\lib\site-packages\south-0.6-py2.6.egg\south\migration.py", line 327, in run_migrations
db.execute_deferred_sql()
File "I:\Python26\lib\site-packages\south-0.6-py2.6.egg\south\db\generic.py", line 116, in execute_deferred_sq
self.execute(sql)
File "I:\Python26\lib\site-packages\south-0.6-py2.6.egg\south\db\generic.py", line 82, in execute
cursor.execute(sql, params)
File "I:\Python26\Lib\site-packages\django\db\backends\util.py", line 19, in execute
return self.cursor.execute(sql, params)
File "I:\Python26\Lib\site-packages\django\db\backends\mysql\base.py", line 84, in execute
return self.cursor.execute(query, args)
File "I:\Python26\Lib\site-packages\MySQLdb\cursors.py", line 166, in execute
self.errorhandler(self, exc, value)
File "I:\Python26\Lib\site-packages\MySQLdb\connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1061, "Duplicate key name 'criteria_shippingmethodcriterion_shipping_methods_shippingmetho'")
и вот такую подсказку:
! Error found during real run of migration! Aborting.
! Since you have a database that does not support running
! schema-altering statements in transactions, we have had to
! leave it in an interim state between migrations.
! You *might* be able to recover with:
= DROP TABLE `criteria_shippingmethodcriterion` CASCADE; []
= DROP TABLE `criteria_shippingmethodcriterion_shipping_methods` CASCADE; []
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS.
- Sending post_syncdb signal for criteria: ['CombinedLengthAndGirthCriterion', 'ShippingMethodCriterion', 'LengthCriterion', 'UserCriterion', 'CountryCriterion
', 'WeightCriterion', 'CartPriceCriterion', 'WidthCriterion', 'PaymentMethodCriterion', 'HeightCriterion', 'CriteriaObjects']
Помогите пожалуйста