Author: jtauber
Date: Mon Oct 20 15:19:36 2008
New Revision: 110

Modified:
    trunk/notification/models.py

Log:
changed notification template naming: plain.txt -> full.txt; teaser.html ->  
notice.html

Modified: trunk/notification/models.py
==============================================================================
--- trunk/notification/models.py        (original)
+++ trunk/notification/models.py        Mon Oct 20 15:19:36 2008
@@ -221,8 +221,7 @@
          # conditionally turn off autoescaping for .txt extensions in format
          if format.endswith(".txt"):
              context.autoescape = False
-        name = format.split(".")[0]
-        format_templates[name] = render_to_string((
+        format_templates[format] = render_to_string((
              'notification/%s/%s' % (label, format),
              'notification/%s' % format), context_instance=context)
      return format_templates
@@ -256,8 +255,8 @@

      formats = (
          'short.txt',
-        'plain.txt',
-        'teaser.html',
+        'full.txt',
+        'notice.html',
          'full.html',
      ) # TODO make formats configurable

@@ -288,14 +287,14 @@

          # Strip newlines from subject
          subject  
= ''.join(render_to_string('notification/email_subject.txt', {
-            'message': messages['short'],
+            'message': messages['short.txt'],
          }, context).splitlines())

          body = render_to_string('notification/email_body.txt', {
-            'message': messages['plain'],
+            'message': messages['full.txt'],
          }, context)

-        notice = Notice.objects.create(user=user,  
message=messages['teaser'],
+        notice = Notice.objects.create(user=user,  
message=messages['notice.html'],
              notice_type=notice_type, on_site=on_site)
          if should_send(user, notice_type, "1") and user.email: # Email
              recipients.append(user.email)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to