[#3026] Django command pour articles
authorPA Parent <paparent@paparent.me>
Sat, 10 Nov 2012 17:21:13 +0000 (12:21 -0500)
committerPA Parent <paparent@paparent.me>
Sat, 10 Nov 2012 17:21:13 +0000 (12:21 -0500)
auf_savoirs_en_partage/savoirs/management/commands/sep_articles.py [new file with mode: 0644]

diff --git a/auf_savoirs_en_partage/savoirs/management/commands/sep_articles.py b/auf_savoirs_en_partage/savoirs/management/commands/sep_articles.py
new file mode 100644 (file)
index 0000000..4204bd9
--- /dev/null
@@ -0,0 +1,14 @@
+# -*- coding: utf-8 -*-
+
+from django.core.management.base import BaseCommand
+
+from auf_savoirs_en_partage.savoirs.models import SourceActualite
+
+
+class Command(BaseCommand):
+
+    def handle(self, *args, **kwargs):
+
+        sources = SourceActualite.objects.all()
+        for src in sources:
+            src.update()