Skip to content

Instantly share code, notes, and snippets.

@AntelopeSalad
Created January 29, 2014 18:37
Show Gist options
  • Save AntelopeSalad/8694121 to your computer and use it in GitHub Desktop.
Save AntelopeSalad/8694121 to your computer and use it in GitHub Desktop.
foo = ParsleyDecimalField(max_digits=18, decimal_places=8, blank=True, default=0)
# using blank=True here because I'm also using django-parsley which decorates an html form with
# declaritive validation rules, if I don't mark this as blank=True then parsley attaches a required=true to the form.
# this is a problem because I want to allow empty values which automatically get saved as the number 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment