1
from optparse import make_option
3
from django.core.management.base import BaseCommand, CommandError
4
from django.contrib.auth.models import User
6
from pybb.models import Post
7
from pybb import settings as app_settings
9
class Command(BaseCommand):
10
help = 'Resave all posts.'
12
def handle(self, *args, **kwargs):
13
app_settings.DISABLE_NOTIFICATION = True
15
for count, post in enumerate(Post.objects.all()):
16
if count and not count % 1000: