forcepdssync.py 378 B

123456789
  1. from django.core.management.base import BaseCommand
  2. from misago.models import User
  3. class Command(BaseCommand):
  4. help = 'Updates unread Private Threads counters update for all users'
  5. def handle(self, *args, **options):
  6. User.objects.update(sync_pds=True)
  7. self.stdout.write('\nUsers accounts were set to sync unread private threads stat on next visit.\n')