Comments (8)
Sorry I cannot understand this issue property, please provide enough information for me to test this.
from sorl-thumbnail.
Confirm the error. Sorl-thumbnail tries to delete the image when I'm saving the object from admin, even if I did not set the "clear" checkbox.
from sorl-thumbnail.
Django version?
from sorl-thumbnail.
Django 1.3
from sorl-thumbnail.
Issue confirmed here as well, django 1.3 + latest sorl-thumbnail package available from pypi.
from sorl-thumbnail.
Issue confirmed here (Django 1.3 final). Also, #31 might be a dup of this one.
The errant situation seems to be the following:
- Upload an image in some model, this works fine.
- Updating the object yields no problems unless a
ValidationError
occurs on one or more fields of the model. - When a
ValidationError
is raised, it causes theImageField
in the form to 'forget' its contents - hence the image has to be uploaded again.
This error might be due to an assumption somewhere that cleaned_data
contains the contents of the ImageField
at all times. However, this need not be the case when a ValidationError
occurs. Hence, when the value of the ImageField
is not present in cleaned_data
it should revert to the value from the model instance.
from sorl-thumbnail.
This is the he same issue as #31, so I'll close it. But the problem occurs even if no ValidationError is raised. As you can see on #31 the filename is not displayed when the record is shown in edit mode. So the problem happesn even there is no ValidatinError.
from sorl-thumbnail.
Fixed in latest version here, pypi will be up soon, just need to test it.
from sorl-thumbnail.
Related Issues (20)
- link on sorl-thumbnail/AUTHORS should be clickable
- Setting storage class does not support deconstructors
- Django 4.1 template tag 'thumbnail' conflict with easy-thumbnails HOT 1
- "Schematic view of how things are done" link in the documentation is dead HOT 1
- Support Django 4.2 - settings.DEFAULT_FILE_STORAGE is deprecated HOT 5
- Should an empty thumbnail template tag raise an exception?
- Delete old thumbnails from the media/cache directory and the database HOT 5
- image doesn't upload at resize_image field given path.
- DeprecationWarning from setuptools 67.5.0 and above HOT 9
- Make THUMBNAIL_STORAGE contain a storage key
- Release new version to support Django 4.2 HOT 14
- Master tests fail HOT 2
- Cache using FileSystemStorage storage engine and not the S3Boto3Storage one defined HOT 1
- Review and accept or reject pending pull requests HOT 2
- AWS S3 with sorl-thumbnail is super slow HOT 9
- How to create a thumbnail in a view, rather than dynamically via a template?
- Broken link in the docs
- django 4.2 - storage options (problem with s3 and template tag)
- Broken links in cache after clear_delete_all
- Transparent padding
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sorl-thumbnail.