Commit e9919b712e8cb5cb9ac74f92a8cd5f672cbbd139
1 parent
cfca1fb8
Exists in
master
and in
39 other branches
Adding command to update message blocks
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | +#!/usr/bin/env python | |
| 2 | + | |
| 3 | +from django.core.management.base import BaseCommand | |
| 4 | +from super_archives.models import Message | |
| 5 | + | |
| 6 | + | |
| 7 | +class Command(BaseCommand): | |
| 8 | + help = "Update message blocks (used to hide the reply part messages)" | |
| 9 | + | |
| 10 | + def handle(self, *args, **kwargs): | |
| 11 | + for message in Message.objects.iterator(): | |
| 12 | + message.update_blocks() | ... | ... |