I'm new to django and want to make a form that allows a user to select one of three images using radio boxes, once the user selects the image it is saved to their profile and displayed on their profile page.
I am using: django 1.8.3 userena 1.4.1
Any help or links to documentation that will help would be great.
If the set of images is small and fixed, the best option is to use the
choiceattribute in the field that defines the image within your model.The image field could be the path to the image file on the file system.
Another option is to use
FilePathFieldas your model fieldAnother way is to fill the form field dynamically when the form is instantiated. Please see this SO QA for more on that.
However, as Django docs say
To specify Radiobuttons to be used for the form field, please refer to the official docs on how to set the proper widget.