blob: c020c17823b822179f501f5640bc22cd3f0c607d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
from django.core.management.base import NoArgsCommand
from django.contrib.auth.models import User
import sys
class Command(NoArgsCommand):
def handle_noargs(self, **options):
msg = None
if msg == None:
print 'to run this command, please first edit the file %s' % __file__
sys.exit(1)
for u in User.objects.all():
u.message_set.create(message = msg % u.username)
|