This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Django makes it really easy to send simple e-mail messages. But e-mails sometimes gets really complicated and un-DRY. That’s where ClassyMail steps in.

Django-ClassyMail is a library for building e-mail messages in a fashion similar to django’s class based views.

You can create mixins, override attributes with keyword arguments and there’s a lot of builtin functionality. Just like class based views.

Django-ClassyMail will handle css inlining, timezone, language and urls for you.

Read the docs for more info:

https://django-classymail.readthedocs.org/en/latest/

And here’s an example:

class UserMixin(ClassyMail):
    """
    Sets language and timezone according to user preferences, adds "user" to
    template context and sets recipient to user's email address.
    """
    user = None

    def get_timezone(self):
        return self.user.get_profile().timezone

    def get_language(self):
        return self.user.get_profile().language

    def get_to(self):
        return [self.user.email]

    def get_context_data(self):
        data = super(UserMixin, self).get_context_data()
        data['user'] = self.user
        return data

class WelcomeEmail(UserMixin, ClassyMail):
    html_template_name = 'emails/welcome.html'
    text_template_name = 'emails/welcome.txt'

    def get_subject(self):
        return _("Welcome %s! Thanks for joining us!") % self.user.first_name
Release History

Release History

0.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1dev

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-classymail-0.2.tar.gz (5.8 kB) Copy SHA256 Checksum SHA256 Source Mar 18, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting