I took a look at following SO question, but had no luck. I don\'t know, maybe I didn\'t understand the answers.
1) How to remove the “Currently” tag and link of a FileIn
The solution is:
class SettingsForm(forms.ModelForm):
company_logo = forms.ImageField(label=_('Company Logo'),required=False, error_messages = {'invalid':_("Image files only")}, widget=forms.FileInput)
class Meta:
model = Settings
fields = ("company_logo")
....
I added the widget forms.FileInput
, in order to tell the ImageField to use the basic field, not the one inherited from FileInput
.