Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-templated-email 0.4.7

    Download button

    No screenshots available
    Downloads: 238  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Bradley Whittington | More programs
    MIT/X Consortium Lic... / FREE
    July 2nd, 2012, 16:58 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-templated-email description

    A Django oriented templated / transaction email abstraction

    django-templated-email is a Django oriented templated email sending class.

    django-templated-email is oriented towards sending templated emails intended for use with transactional mailers (ala mailchimp, silverpop, etc.), but currently comes out of the box with a backend class which uses django's templating system, and django's core.mail functions.

    Getting going - installation:

    Installing:

        pip install templated_email

    You can add the following to your settings.py (but it works out the box)::

        TEMPLATED_EMAIL_BACKEND = 'templated_email.backends.vanilla_django.TemplateBackend'

        # For the django back-end specifically
        TEMPLATED_EMAIL_DJANGO_SUBJECTS = {
            'welcome':'Welcome to my website',
        }


    Getting going - sending your template emails:

    Example usage using vanilla_django TemplateBackend backend

    Python to send mail:

        from templated_email import send_templated_email
        send_templated_email(
                template_name='welcome',
                from_email='from@example.com',
                recipient_list=['to@example.com'],
                context={
                    'username':request.user.username,
                    'full_name':request.user.get_full_name(),
                    'signup_date':request.user.date_joined
                }
        )


    Which looks in django template directories/loaders for *templated_email/welcome.txt* :

        Hey {{full_name}},

        You just signed up for my website, using:
            username: {{username}}
            join date: {{signup_date}}

        Thanks, you rock!


    It will also use *templated_email/welcome.html* for the html part of the email allowing you to make it so much pretty. It is plausible that one day there will be support for attachments and inline mime / images


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    transaction email | templated email | Django | templated | transaction

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM