1👍
✅
Python is dynamically typed. There’s no such thing as a “tuple variable”, there are only names. If you want a tuple to be assigned to a name, you need a tuple on the RHS of the assignment:
five_image = (display_image,)
0👍
You can’t define tuple as we can define list
five_image = []
you must put tuple value in round paranthesis with comma if it’s single value.
five_image = (display_image,)
Hopefully it will work for you.
- [Answer]-Matching manytomany fields in django
- [Answer]-Django admin removes selected choice in ModelChoiceField on edit?
- [Answer]-Is it possible to extend Django admin with views not related to the database tables content?
- [Answer]-Django-autocomplete-light with User – choices should be a queryset
- [Answer]-Named groups in Django based off model field?
Source:stackexchange.com