Comments (8)
I thought I released this last month but I forgot to upload it to PyPI! This has been fixed in the 1.6 release which you can now install from PyPI:
$ pip install django-versatileimagefield==1.6
Thanks for finding (and patching!) this bug! :)
from django-versatileimagefield.
Hello! I have the same issue
from django-versatileimagefield.
@GRLeo and others: We are going to use the fix in our fork until this issue is fixed in this repository.
from django-versatileimagefield.
Hey @Mortal !
I'd be more than happy to merge in the fix on your fork if it's ready. Would you mind writing some test coverage and some integration docs then submit a PR? If everything checks out I'll do a re-release to PyPI ASAP.
from django-versatileimagefield.
Hi @respondcreate, I added a unit test in TK-IT/django-versatileimagefield branch issue-54 now.
What are integration docs?
from django-versatileimagefield.
Hey @Mortal –
By integration docs I mean writing some simple documentation about how the changes you've recently made will impact the end-user. Try to think in terms of a questions a developer would have if they wanted to have a custom upload_to for a VersatileImageField
. Here's an example:
I have a custom upload_to function, how can I ensure images created by this field can be deleted with the file-deletion API?
I noticed that you've added a custom per-field regex so a good place to start would be to provide an example upload_to function and then how a regex could be written to match that.
Also: don't worry about adding it to the sphinx-built docs, you can just write it in a comment on your PR. Basically I'm looking for something I can use to get acquainted with the work you've done recently so I can write some proper documentation.
Does that make sense?
P.S. Thanks for taking the time to do this work, I (and the other users of this little app) appreciate it!
from django-versatileimagefield.
Hi @respondcreate,
Yes, it makes sense. I've opened pull request #62 with some additional information on what the user needs to do with my changes.
from django-versatileimagefield.
I'm not sure, is my bug related to this, but...
I have custom upload_to
path.
But I'm not using subclassed SizedImage
.
I have only several rendition key sets in settings like this
VERSATILEIMAGEFIELD_RENDITION_KEY_SETS = {
'response_image': [
('full_size', 'url'),
('preview', 'thumbnail__45x45')
],
'comment_image': [
('full_size', 'url'),
('preview', 'thumbnail__45x45')
]
}
And pre-warmer in post_save signal like this
@receiver(post_save, sender=ResponseImage)
@receiver(post_save, sender=CommentImage)
def warm_img(instance, **kwargs) -> None:
img_warmer = VersatileImageFieldWarmer(
instance_or_queryset=instance,
rendition_key_set=instance.RENDITION_KEYSET,
image_attr='image'
)
img_warmer.warm()
instance.RENDITION_KEYSET
matches key in settings.
After I read #62 I suggest that my thumbnail images must contain thumbnail
word in file name, but they doesn't.
And now I'm not sure, what should I fix.
I have no control on thumbnail image file names. Only on original image.
Should I subclass ThumbnailImage
, redefine it filename_key_regex
or filename_key
? Or something else?
from django-versatileimagefield.
Related Issues (20)
- Unclear docs on using VersatileImageFieldWarmer with rendition sets HOT 1
- python-magic 0.4.20 incompatible
- Fails to work with django-cacheops HOT 2
- How to store filename returned by storage for sized images? HOT 1
- Test with Python3.9
- Test with Django 3.1 and 3.2
- Add Django 3.2 Compatibility HOT 1
- Test with djangorestframework 3.11 and 3.12
- error to upload images using django-rest and angular HOT 1
- versatileimagefield How to use Django Graphql
- Deleting all created images for the image without extension fails
- VersatileImageFieldWarmer regenerate images for delete rendition key set
- Question: is it possible to use this app with static files?
- AttributeError: module 'magic' has no attribute 'from_buffer' HOT 1
- Django 4 HOT 3
- Question: Crop as circle
- Extra queries when warming with VersatileImageFieldWarmer
- django-versatileimagefield doesn't work on Pillow >= 10.0.0 released 1 July HOT 5
- Created images not deleted when using image_key_post_processor
- Configurable exception handling
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 django-versatileimagefield.