Sunday, July 15, 2012

Django Models: How to allow users to select an image from a choice of 3 pictures

I am familiar with the use of Field.choices for text.

However, I'd like the same option for images.  Is this possible?  I want users to select one image from a list of 3 and be able to save this.  They can later come back in and change it if they wish.  I know that in order to save this, it must be in Models.

The idea:

Each day, the has the option of selecting an image: happy face, sad face, smiley face of how they are feeling.  Their selection is saved.  They can go in later to change it if they wish.

ImageField doesn't seem to do this.  It seems to only allow for uploaded images as opposed to a choice.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Cr7s4l8i_bcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate