Login

Snippets by sasha

Snippet List

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

sasha has posted 1 snippet.