Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to store svgs in django image field with SVGAndImageFormField

class MyModelForm(forms.ModelForm):
    class Meta:
        model = MyModel
        exclude = []
        field_classes = {
            'image_field': SVGAndImageFormField,
        }

class MyModelAdmin(admin.ModelAdmin):
    form = MyModelForm

admin.site.register(MyModel, MyModelAdmin)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #store #svgs #django #image #field #SVGAndImageFormField
ADD COMMENT
Topic
Name
9+5 =