Permalink
Browse files

Update version to 0.2.1

- Changed README format to reStructuredText, for rendering on PyPi
- Added CHANGELOG
  • Loading branch information...
1 parent a1aa1d6 commit fc4cd2aec8baae390425aba52f7f392b10ea2138 Kevin Renskers committed Dec 1, 2011
Showing with 43 additions and 13 deletions.
  1. +10 −0 CHANGELOG
  2. +31 −11 README.md → README.rst
  3. +2 −2 setup.py
View
@@ -0,0 +1,10 @@
+0.1: never released
+- First initial version
+
+0.2: December 1, 2011
+- First public release on PyPi
+- Added correct package dependencies
+
+0.2.1: December 1, 2011
+- Changed README format to reStructuredText, for rendering on PyPi
+- Added CHANGELOG
View
@@ -1,26 +1,45 @@
-# Django generic (class based) mail
+========
+Overview
+========
-Easy to use, class based email for Django.
+**Easy to use, class based email for Django.**
-## The problem
-There is no unified way in our Django projects to send email. Django's own email functions require too much boilerplate code and are not intelligent enough. They are also not class based.
+The problem
+===========
+There is no unified way in our Django projects to send email. Django's own email functions require too much boilerplate
+code and are not intelligent enough. They are also not class based.
-Sending email should be as easy as creating an instance of the email class, provide one piece of text, and calling the send() method. This is the easiest, most common case. It should also be possible to override base templates, give separate text- and html versions, send the mail to a queue, etc.
+Sending email should be as easy as creating an instance of the email class, provide one piece of text, and calling the
+send() method. This is the easiest, most common case. It should also be possible to override base templates,
+give separate text- and html versions, send the mail to a queue, etc.
-## What this class will do for you
+What this class will do for you
+===============================
- It will send text email if:
+
1. there is a custom text template, or
+
2. when using default templates, if text_body is set
+
- It will send html email if:
+
1. there is a custom html template, or
+
2. when using default templates, if html_body is set
+
- You can also force to send a text email when there is only a html_body. It will then convert html to text for you.
+
- You can also force to send a html email when there is only a text_body. It will then convert text to html for you.
-## What it doesn't do
-This email class doesn't know about mail queues. You can use a custom email backend or a project like [Django-mailer](https://github.com/jtauber/django-mailer) for that.
+What it doesn't do
+==================
+This email class doesn't know about mail queues. You can use a custom email backend or a project like
+https://github.com/jtauber/django-mailer for that.
+
+Usage
+=====
+::
-## Usage
from generic_mail import Email
# This will send text email only, uses the email/base_text_email.html template with the "body" template variable
@@ -63,6 +82,7 @@ This email class doesn't know about mail queues. You can use a custom email back
email = Email('to@example.com', 'Subject')
email.send()
-## Subclassing
+Subclassing
+===========
If you want to create your own subclass that has different defaults (other templates, subject, etc), the best way to do
-this is by changing the class properties instead of overriding the `__init__` method.
+this is by changing the class properties instead of overriding the ``__init__`` method.
View
@@ -2,9 +2,9 @@
setup(
name="django-generic-mail",
- version='0.2',
+ version='0.2.1',
description="Easy to use, class based email for Django",
- long_description=open("README.md").read(),
+ long_description=open("README.rst").read(),
author="Kevin Renskers",
author_email="info@mixedcase.nl",
url="https://github.com/kevinrenskers/django-generic-mail",

0 comments on commit fc4cd2a

Please sign in to comment.