Upload Image Field? ASAP PLS

10 views
Skip to first unread message

Richard Vo

unread,
Nov 17, 2018, 9:32:49 PM11/17/18
to Django users
Need to upload an image, manipulate the image through Python Pillow, then display it. 

Whatever additional information I need to provide, please let me know. 

Shashank Singh

unread,
Nov 17, 2018, 9:34:25 PM11/17/18
to django...@googlegroups.com
Why not doing it? Where are you stuck?

On Sun, 18 Nov, 2018, 8:02 AM Richard Vo <rjv...@gmail.com wrote:
Need to upload an image, manipulate the image through Python Pillow, then display it. 

Whatever additional information I need to provide, please let me know. 

--
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...@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/42fd7a1a-df2f-4ded-807e-413587beaefc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yavin Aalto Arba

unread,
Nov 18, 2018, 3:55:33 AM11/18/18
to django...@googlegroups.com
Assuming this is just a general question about the subject:

Django Models has an imagefield option:

The image has a .url attribute which you can use for displaying (or you can use the % static % method). cf. "For example, if your ImageField is called mug_shot, you can get the absolute path to your image in a template with {{ object.mug_shot.url}}."

These attributes shouldn't change in the event that the server manipulates the image. 

the .name attribute will give you the full on-disk path, which you can use for whichever manipulations you need.



Reply all
Reply to author
Forward
0 new messages