Providing browse from uploads button for ImageField
12 views
Skip to first unread message
Burak Emre Kabakcı
unread,
Oct 13, 2013, 11:07:58 PM10/13/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Is it possible to change field type when saving a model to database? I have an ImageField and I want to put a button for choosing an image already uploaded. I know that ImageField acts like CharField when saving data to database but it uses multipart/form-data so it doesn't see POST data when converting the user data to a model. When I change the input type to text and append some strings to it ImageField doesn't change. I can do it with ModelAdmin.save_model by manipulating ImageField manually with POST data but I wonder if it's possible to do something like that in Field level.