]> git.openstreetmap.org Git - osqa.git/blob - forum/management/commands/message_to_everyone.py
OSQA-533, fixed some W3C validation errors: closing <img /> tags, removed some unnece...
[osqa.git] / forum / management / commands / message_to_everyone.py
1 from django.core.management.base import NoArgsCommand
2 from forum.models import User
3 import sys
4
5 class Command(NoArgsCommand):
6     def handle_noargs(self, **options):
7         msg = None
8         if msg == None:
9             print 'to run this command, please first edit the file %s' % __file__
10             sys.exit(1)
11         for u in User.objects.all():
12             u.message_set.create(message = msg % u.username)