[Answered ]-Binding Files to Forms in Django

2👍

You could use the widget from admin to see which file is currently uploaded.

Like:

from django.contrib.auth.widgets import AdminFileWidget
class ImageForm(forms.ModelForm):
    nameofimagefield = forms.ImageField(widget=AdminFileWidget)
    class Meta:
        model = MyImage
👤rinti

Leave a comment