Commits

illume  committed 262b313

Changed some config item names to be more descriptive.

  • Participants
  • Parent commits ef07a92

Comments (0)

Files changed (3)

File newsletter/newsletterapp/newsletterapp.ini

 # To make more, create new sections starting with send_message_
 # These are useful for things like contact forms.
 
+# where you want this one mounted.
+mount_point = "contact"
+
 # exposed if you want to be able to send emails using a send_message url.
 send_message = True
 
-# where you want this one mounted.
-mount_point = "contact"
-
 # set this to True if you want this to work.  Secure by default means it does not work.
 exposed = False
 
 # the email template to use for the body of the message.
-email_template = "send_message_email_template"
+email_body_template = "send_message_email_template"
 
 # the email template to use for the subject
 email_subject_template = "send_message_email_subject_template"
 
 # the html returned.
-template = "send_message_template"
+web_front_template = "send_message_template"
 
 
 fromaddr = "yourname@example.com"
 
-# if this is empty then we get this from the toaddr input.
+# if this is None then we try and get this from the toaddr input.
 toaddr = "sendingto@example.com"
 
 # validate_input is a function which can be used to validate the input.

File newsletter/newsletterapp/newsletterapp.py

         wrap_it = kwargs.get('wrap_it', None)
 
 
-        email_template = self.send_message_config.get('email_template')
+        email_body_template = self.send_message_config.get('email_body_template')
         email_subject_template = self.send_message_config.get('email_subject_template')
-        template = self.send_message_config.get('template')
+        web_front_template = self.send_message_config.get('web_front_template')
         
         toaddr = self.send_message_config.get('toaddr', '')
 
         replace_vars['toaddr'] = toaddr
 
         subject = self.web_newsletter.admin.email_template(email_subject_template)
-        body = self.web_newsletter.admin.email_template(email_template)
+        body = self.web_newsletter.admin.email_template(email_body_template)
         
 
         # replace the variables in the template.
                 self.config.get('sendmail_cmd'),
                 )
         
-        return self.web_newsletter.html_template(template, wrap_it)
+        return self.web_newsletter.html_template(web_front_template, wrap_it)
         
         
     def validate_input(self, kwargs):

File newsletter/newsletterapp/test_newsletterapp.py

     >>> cfg['send_message_a'] = dict(send_message = True, 
     ...     mount_point = "contact", 
     ...     exposed = True, 
-    ...     email_template = "send_message_email_template", 
+    ...     email_body_template = "send_message_email_template", 
     ...     email_subject_template = "send_message_email_subject_template", 
-    ...     template = "send_message_template", 
+    ...     web_front_template = "send_message_template", 
     ...     fromaddr = "yourname@example.com", 
     ...     toaddr = "sendingto@example.com", 
     ...     validate_input = lambda kwargs: kwargs.get('input', 'ok input') == 'ok input')