mirumee / django-images Goto Github PK
View Code? Open in Web Editor NEWA database-driven thumbnailing solution for Django
A database-driven thumbnailing solution for Django
Pillow is described as a "friendly" fork of a PIL library maintained by the Plone community. PIL hasn't seen release for few years, and it's current version have an irritating bug where it doesn't detect system libraries on newer Debian and Ubuntu releases. Unfortunately even though Pillow provides a PIL package it doesn't actually satisfy the PIL dependency so it has to be changed or django-images installation overwrites a local pillow package.
Hi,
Supporting input file with multipart attribute (html5) is not so hard to implement. Basicly, I have done it using
in view:
def form_valid(self, form):
for image in self.request.FILES.getlist('image'):
CustomImageModel(image=image).save()
in html:
add multipart
attribute
It would be nice to have that feature out of the box. What do you think?
Tag 0.4.3 still references south.db in migrations which is a nuisance.
I got a report from someone who has managed to end up with two thumbnails for the same original image and size, but with different file names.
I've disjointed Image creation from thumbnail creation - image created at upload, thumbnails created when requested.
What I believe to have happened is that two concurrent requests for thumbnails have been made and Thumbnail.get_or_create_at_size executed image.thumbnail_set.create() twice.
Because unique constraint for Thumbnail is ("image", "size"), and because Django appends "_1" to file name when original name is taken, the second duplicated thumbnail row has been inserted - the same original_id and the same size but different image columns. Later when Image.get_by_size() was called MultipleObjectsReturned exception was raised.
I believe Thumbnail unique_together should be changed to ("original", "size"), coincidentally I believe it's a "more correct" constraint. Also, a migration should probably be created for South so existing applications can be fixed.
Adding this info into documentation would be very nice for no-pro django devs.
django-images is listed when using pip search django-images
but can't be installed using pip install django-images
. Looks like there's no links at http://pypi.python.org/simple/django-images .
Hi, help me please. I have some JPEG:
https://dl.dropbox.com/u/608563/shared/bad1.jpg
https://dl.dropbox.com/u/608563/shared/bad2.jpg
Try to upload it to django-images. It not works :(
Thanks,
Vitaliy
Useful for when you change the dimensions or drop a size entirely.
I'm getting all these warnings that the models don't declare an explicit app label.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.