[Answered ]-Django โ€“ partially validating form

2๐Ÿ‘

โœ…

Have you tried subclassing AdForm and modifying the fields in the inner Meta class? Something like this:

class AdFormLite(AdForm):
    class Meta:
        fields = ['category', 'sub_category']

From the documentation for ModelForm on changing the order of fields:

The fields attribute defines the
subset of model fields that will be
rendered, and the order in which they
will be rendered.will be rendered.

๐Ÿ‘คjathanism

Leave a comment