Installing Satchmo in Windows on Django 1.0. Load test data step (first syncdb).
An error is thrown when installing into a deep directory, as absolute file URLs are stored in the database, and the field length is limited to 100.
This applies to:
- product_image.picture (throwing the error on install)
- category_image.picture (error not thrown on install as no test data provided)
Suggested fix:
a) extend field length (to 1024?)
b) store relative image paths only (surely this would be better anyway?)
Complete error:
http://groups.google.com/group/satchmo-users/browse_thread/thread/050efeb524684def/acd4224c80e7a2a9?hl=en#acd4224c80e7a2a9
Installing yaml fixture 'initial_data' from 'C:\dev\lib\Python25\lib
\site-packag
es\satchmo\shop\fixtures'.
Problem installing fixture 'C:\dev\lib\Python25\lib\site-packages
\satchmo\shop\f
ixtures\initial_data.yaml': Traceback (most recent call last):
File "C:\dev\lib\django\django\core\management\commands
\loaddata.py", line 116
, in handle
obj.save()
File "C:\dev\lib\django\django\core\serializers\base.py", line 163,
in save
models.Model.save_base(self.object, raw=True)
File "C:\dev\lib\django\django\db\models\base.py", line 390, in
save_base
created=(not record_exists), raw=raw)
File "C:\dev\lib\django\django\dispatch\dispatcher.py", line 148, in
send
response = receiver(signal=self, sender=sender, **named)
File "C:\dev\lib\Python25\Lib\site-packages\satchmo\thumbnail
\field.py", line
86, in _save_rename
instance.save()
File "C:\dev\lib\django\django\db\models\base.py", line 307, in save
self.save_base(force_insert=force_insert,
force_update=force_update)
File "C:\dev\lib\django\django\db\models\base.py", line 358, in
save_base
rows = manager.filter(pk=pk_val)._update(values)
File "C:\dev\lib\django\django\db\models\query.py", line 429, in
_update
return query.execute_sql(None)
File "C:\dev\lib\django\django\db\models\sql\subqueries.py", line
117, in exec
ute_sql
cursor = super(UpdateQuery?, self).execute_sql(result_type)
File "C:\dev\lib\django\django\db\models\sql\query.py", line 1724,
in execute_
sql
cursor.execute(sql, params)
File "C:\dev\lib\django\django\db\backends\util.py", line 19, in
execute
return self.cursor.execute(sql, params)
DataError?: value too long for type character varying(100)