Tried something like this, but it doesn't work... class ZipCodeAdmin(admin.ModelAdmin): list_display = ['zipcode', 'city', 'active'] ordering = ['zipcode']
def toggle_status(self, request, queryset): for item in queryset: item.active = True item.save() return item Am Samstag, 13. Dezember 2014 23:00:04 UTC+1 schrieb inoyon artlover KLANGRAUSCH: > > 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+unsubscr...@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/35a1d744-9763-46d7-8bae-657aefe8cc5a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.