1 from forum.models import User, SubscriptionSettings, QuestionSubscription
2 from django.core.management.base import NoArgsCommand
4 class Command(NoArgsCommand):
5 def handle_noargs(self, **options):
6 users = User.objects.all()
8 s = SubscriptionSettings(user=u)
11 user_questions = u.questions.all()
13 for q in user_questions:
14 sub = QuestionSubscription(user=u, question=q)