Login

Tag "booleanfield"

Snippet List

AgreementField

Creating new field to handle checkbox validation in situations where the checkbox must be checked, as in check to agree to terms and such. Thanks to Daniel Pope for the [suggestion](http://code.djangoproject.com/ticket/5957#comment:7) on Django Trac Ticket #[5957](http://code.djangoproject.com/ticket/5957)

  • newforms
  • checkbox
  • forms
  • validation
  • clean
  • booleanfield
  • agreement
Read More

Online boolean switch in the admin list

You can switch boolean fields in the admin without editing objects Usage: ` class News(models.Model): # ... pub = models.BooleanField(_('publication'),default=True) # ... pub_switch = boolean_switch(pub) class Admin: list_display = ('id', 'pub_switch') ` Thanks for [svetlyak](http://www.djangosnippets.org/snippets/398/).

  • admin
  • booleanfield
Read More

2 snippets posted so far.