You should take a look to this plugin ... does exactly what you need.
http://djangothumbnails.com/
the user uploads the image and you create as many thumbnails for thoses
images as needed
2016-06-03 21:07 GMT+01:00 ivan77 :
> Thanks!
>
> On Friday, June 3, 2016 at 2:08:01 PM UTC-4, Ketan Bhatt
Thanks!
On Friday, June 3, 2016 at 2:08:01 PM UTC-4, Ketan Bhatt wrote:
>
> I am storing links of these images as I need to show them on the frontend,
> not connected to any user.
>
> But I have done what you are talking about too.
> So Django gives you a Model File Field. Add that to your Mode
I am storing links of these images as I need to show them on the frontend,
not connected to any user.
But I have done what you are talking about too.
So Django gives you a Model File Field. Add that to your Model. That will
allow you to save and store files. While saving a model object, just use
t
Hi Ketan,
Thanks for the information!
How is it that you keep the images associated with other tables in the
database?
What I am specifically thinking about is if you want to associate specific
images with specific users who uploaded, for example? Some kind of bridge
(many to many table)?
This is how you can compress the images while saving:
```python
import urllib2
import cStringIO
from boto3.session import Session
from PIL import Image
aws_session = Session(
aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
region
5 matches
Mail list logo