]> git.parisson.com Git - teleforma.git/commitdiff
fix paragraphs, args
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 9 Dec 2013 16:42:40 +0000 (17:42 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 9 Dec 2013 16:42:40 +0000 (17:42 +0100)
teleforma/management/commands/teleforma-message-all-seminar-users.py
teleforma/templates/teleforma/messages/seminar_remind.txt

index ef054176b7f923ffb823aeb8dc5300568d722487..df6d6df8adfd2f859d42d0c2672e0b979fabb2fd 100644 (file)
@@ -26,7 +26,7 @@ class Command(BaseCommand):
     language_code = 'fr_FR'
 
     def handle(self, *args, **kwargs):
-        days = args[-1]
+        days = int(args[-1])
         users = User.objects.all()
         translation.activate(self.language_code)
         sender_email = settings.DEFAULT_FROM_EMAIL
@@ -60,7 +60,7 @@ class Command(BaseCommand):
                     text = render_to_string(self.message_template, context)
                     subject = render_to_string(self.subject_template, context)
                     # subject = '%s : %s' % (seminar.title, subject)
-                    
+
                     mess = Message(sender=sender, recipient=user, subject=subject[:119], body=text)
                     mess.moderation_status = 'a'
                     mess.save()
index 66c586b865480cb08baae6e6a3b25df8e69e60ef..8f0cf25877140543f784d1d18f687da33c00da8e 100644 (file)
@@ -1,9 +1,7 @@
 {% load i18n %}{% autoescape off %}{% blocktrans %}{{ gender }} {{ last_name }},
 
 Certains de vos séminaires e-learning arrivent bientôt à expiration :{% endblocktrans %}
-{% for seminar in seminars %}
-    * "{% if seminar.sub_title %}{{ seminar.sub_title }}{% else %}{{ seminar.title }}{% endif %}" {% trans "expires on" %} {{ seminar.expiry_date }}.
-{% endfor %}{% blocktrans %}
+{% for seminar in seminars %}* "{% if seminar.sub_title %}{{ seminar.sub_title }}{% else %}{{ seminar.title }}{% endif %}" {% trans "expires on" %} {{ seminar.expiry_date }}.{% endfor %}{% blocktrans %}
 Nous vous rappelons que vous devez achever vos formations avant ces dates.
 
 De plus, si vous souhaitez conserver les supports pédagogiques écrits de votre formation (compte-rendu écrit et recueil(s) de documents d'actualité), nous vous rappelons que ceux-ci sont entièrement téléchargeables sur la plate-forme e-learning de {{ organization }} jusqu'aux dates d'expiration de chaque séminaire.