I made a ModelForm from a Model in Django, the model have an ImageField field on it. When I render the info of the form in a template for editing it, it show this:
How I can remove the 'Currently' tag and link??
The Django Admin uses AdminFileWidget
to render ImageFields. AdminFileWidget
merely inherits from the standard FileInput
widget and adds the extra "Currently" stuff. So just use FileInput
instead:
from django.db import models
from django import forms
class MyModelAdmin(admin.ModelAdmin):
formfield_overrides = {
models.ImageField: {'widget': forms.FileInput },
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With