how set image (dimension) upload height and weight in django models without from

37 views
Skip to first unread message

arvind yadav

unread,
Mar 20, 2018, 8:50:03 AM3/20/18
to Django users
class Member(models.Model):
    id = models.AutoField(db_column='ID', primary_key=True) 
    name = models.CharField(db_column='NAME', max_length=255) 
    member = models.CharField(db_column='MEMBER', max_length=255) 
    sequence_num = models.IntegerField(db_column='SEQUENCE_NUM') 
    img_url = models.FileField(db_column='IMG_URL',
        storage=S3BotoStorage(bucket=settings.S3_BUCKET_COMMON,location=settings.CDN_PREFIX_MEMBER_IMG, calling_format=OrdinaryCallingFormat()), 
        max_length=200, blank=True, null=True)

    class Meta:
        managed = False
        db_table = 'MEMBER'

how set image (dimension) upload height and weight  in img_url FileField 
please thank you

Andréas Kühne

unread,
Mar 20, 2018, 9:54:47 AM3/20/18
to django...@googlegroups.com
Hi,

I use a plugin called easy thumbnails for things like this. It doesn't set what the user can upload, however it scales the uploads to the dimensions you need.


Regards,

Andréas

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0f9dc4fd-5b73-451f-bc49-31801a13537d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages