liuyang1520 / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

Django's new FileField and ImageField behaviour and dumpscript #79

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The improvements on FileField and ImageField mean that dumpscript needs to
be updated for newer django versions. Perhaps the following is necessary:

myobject.__dict__['file'] = 'path/to/file.jpg'

Original issue reported on code.google.com by e.willha...@gmail.com on 6 Feb 2009 at 5:09

GoogleCodeExporter commented 8 years ago
Nope, reading through django's source, it looks like the value for this field 
needs
to have a _commited attribute set to True to avoid the myobject.file.save() 
method
being called.

Original comment by e.willha...@gmail.com on 6 Feb 2009 at 6:19

GoogleCodeExporter commented 8 years ago
This appears to only be an issue with Satchmo's ImageWithThumbnailField, not 
with
Django's FileFields.

Original comment by e.willha...@gmail.com on 6 Feb 2009 at 6:34