]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/management/commands/create_subscriptions.py
adding middleware that handles custom pages
[osqa.git] / forum / management / commands / create_subscriptions.py
index b97c970cd9507a570aa80768f3f7d1e4eb9c89fe..3e0da3e7009804566bde305ed54981e77645b044 100644 (file)
@@ -1,15 +1,15 @@
-from forum.models import User, SubscriptionSettings, QuestionSubscription\r
-from django.core.management.base import NoArgsCommand\r
-\r
-class Command(NoArgsCommand):\r
-    def handle_noargs(self, **options):\r
-        users = User.objects.all()\r
-        for u in users:\r
-            s = SubscriptionSettings(user=u)\r
-            s.save()\r
-\r
-            user_questions = u.questions.all()\r
-\r
-            for q in user_questions:\r
-                sub = QuestionSubscription(user=u, question=q)\r
+from forum.models import User, SubscriptionSettings, QuestionSubscription
+from django.core.management.base import NoArgsCommand
+
+class Command(NoArgsCommand):
+    def handle_noargs(self, **options):
+        users = User.objects.all()
+        for u in users:
+            s = SubscriptionSettings(user=u)
+            s.save()
+
+            user_questions = u.questions.all()
+
+            for q in user_questions:
+                sub = QuestionSubscription(user=u, question=q)
                 sub.save()
\ No newline at end of file