Skip to content

Instantly share code, notes, and snippets.

@jonathancg90
Last active December 16, 2015 02:59
Show Gist options
  • Save jonathancg90/5366757 to your computer and use it in GitHub Desktop.
Save jonathancg90/5366757 to your computer and use it in GitHub Desktop.
def get_form(self, form_class):
_form = super(ProductModelCreateView, self).get_form(form_class)
_form.fields["maximum_order"].initial = 0
_form.fields["maximum_order"].widget = HiddenInput()
===================================
Campo requerido en vista
_form.fields["maximum_order"].required = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment