Saturday, December 13, 2014

How to toggle/set boolean-values of multiple records in the Admin?

Hi there,

my model is:

class ZipCode(models.Model):
    zipcode = models.CharField(max_length=5)
    city = models.CharField(max_length=255)
    active = models.BooleanField(default=False)

I would like to mange the 'active' status of some entries in the admin by selecting multiple.
For example: I select 20 entries and than toggle or set the 'active' status to True/False.

Many thanks in advance. Cheers :)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8b5b43d6-9c31-4f8f-9765-d1b86e655dcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment