class PictureInline(admin.StackedInline):
    model = Picture_Gallery
extra = 3

def formfield_for_dbfield(self, db_field, **kwargs):
    if db_field.name == 'name':
        kwargs['widget'] = MyWidget()
How do I add a custom inline admin widget in Django?