from django.core.management import BaseCommand from django.db import transaction from boards.models import Post from boards.models.post.manager import NO_IP __author__ = 'neko259' class Command(BaseCommand): help = 'Removes user and IP data from all posts' @transaction.atomic def handle(self, *args, **options): Post.objects.all().update(poster_ip=NO_IP)