class Command(BaseCommand):
- help = "Braodcast a jqchat message on the main site room by the admin"
- args = "text username"
+ help = "Broadcast a jqchat message on the main site room by the admin"
+ args = "username text"
def handle(self, *args, **options):
text = args[1]
username = args[0]
user = User.objects.get(username=username)
- rooms = Room.objects.filter(name__in='site')
+ rooms = Room.objects.filter(name__contains='site')
for room in rooms:
message = Message.objects.create_message(user, room, text)