1
The easiest way is likely to specify a form with:
class PostForm(forms.ModelForm):
class Meta:
model = Post
fields = '__all__'
labels = {'image_in_base64 ': 'Main image of the post'}
widgets = {'image_in_base64': forms.FileInput()}
and then plug this into the ModelAdmin
:
from django.contrib import admin
class MyAdminPost(admin.ModelAdmin):
form = PostForm
Source:stackexchange.com