{
"info": {
"author": "Artem Rizhov, Max hurl",
"author_email": "artem.rizhov@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "==========\nDjango-Mail-Templated\n==========\n\nThis is a fork of `https://github.com/artemrizhov/django-mail-templated\n`_. that includes support for template extension and supports Django 1.8\n\n.. image:: https://travis-ci.org/maximilianhurl/django-mail-templated.svg\n :target: https://travis-ci.org/maximilianhurl/django-mail-templated\n\n\nOverview\n=================\nThis is a tiny wrapper around the standard EmailMessage class and send_mail()\nfunction. Just pass template_name and context as the first parameters then use\nas normal.\n\nInstallation\n=================\nRun::\n\n $ pip install max-django-mail-templated\n\nAnd register the app in your settings file::\n\n INSTALLED_APPS = (\n ...\n 'mail_templated'\n )\n\nUsage\n=================\nWrite a template to send a plain text message. Note that first and last newline\nwill be removed::\n\n {% block subject %}\n Hello {{ user.name }}\n {% endblock %}\n\n {% block body %}\n This is a plain text message.\n {% endblock %}\n\nOr for an html message::\n\n {% block subject %}\n Hello {{ user.name }}\n {% endblock %}\n\n {% block html %}\n This is an html message.\n {% endblock %}\n\nOr for a multipart message you can use both blocks::\n\n {% block subject %}\n Hello {{ user.name }}\n {% endblock %}\n\n {% block body %}\n This is a plain text message.\n {% endblock %}\n\n {% block html %}\n This is an html message.\n {% endblock %}\n\nOr leave out some block to set it manually later with EmailMessage class::\n\n {% block body %}\n This is a plain text message.\n {% endblock %}\n\nNow you can send it::\n\n from mail_templated import send_mail\n send_mail('email/hello.tpl', {'user': user}, from_email, [user.email])\n\n\nYou can add in BCC like this::\n\n send_mail('email/hello.tpl', {'user': user}, from_email, [user.email], bcc=[user2.email])\n\nYou can also add an attachment like this::\n\n\tsend_mail('email/hello.tpl', {'user': user}, from_email, [user.email], attachment=\"file/path.pdf\")\n\nOr if you wish to add more control over message creation then use the class form::\n\n from mail_templated import EmailMessage\n message = EmailMessage('email/hello.tpl', {'user': user}, to=[user.email])\n # ... attach a file, etc\n message.send()\n\nThat's all. Please create an issue at GitHub if you have any notes,\n...or just email :)\n\nExtends\n=================\n\nYou can extend templates like so::\n\n\t{% extends \"email_base.tpl\" %}\n\n\t{% block subjectcontent %}\n\tSubject\n\t{% endblock %}\n\n\t{% block bodycontent %}\n\t This is a plain text message.\n\t{% endblock %}\n\n\t{% block htmlcontent %}\n\tThis is an html message.\n\t{% endblock %}\n\n\nand email_base.tpl would look like this::\n\n\t{% block subject %}\n\t{% block subjectcontent %}{% endblock %}\n\t{% endblock %}\n\n\t{% block body %}\n\tA heading or logo\n\t{% block bodycontent %}{% endblock %}\n\t{% endblock %}\n\n\t{% block html %}\n\tA heading or logo\n\t{% block htmlcontent %}{% endblock %}\n\t{% endblock %}\n\n**Please note that you must include all blocks in the base template file.**\n\nIf you dont include one of the blocks in the base template it will not be shown. So you cannot, for example, move the subject block into the top file.\n\n\nTests\n=================\n\nTo run the unit tests you first need to create a virutal env in project root directory.\n\n virtualenv env\n\nThen you need to install the test requriements.\n\n env/bin/pip install -r requirements.txt\n\nNow you can run the unit tests using the following command.\n\n env/bin/python mail_templated/tests/runtests.py",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/maximilianhurl/django-mail-templated",
"keywords": null,
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "max-django-mail-templated",
"package_url": "https://pypi.org/project/max-django-mail-templated/",
"platform": "any",
"project_url": "https://pypi.org/project/max-django-mail-templated/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/maximilianhurl/django-mail-templated"
},
"release_url": "https://pypi.org/project/max-django-mail-templated/1.3/",
"requires_dist": null,
"requires_python": null,
"summary": "Send emails with Django template system",
"version": "1.3"
},
"last_serial": 1677264,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "261e51c60ffc3c744dedd2f012b5dc18",
"sha256": "bdf4b718eac8e9f8af50e9094b7a7a82c015200d13f56df739f581d19b738cec"
},
"downloads": -1,
"filename": "max-django-mail-templated-1.0.tar.gz",
"has_sig": false,
"md5_digest": "261e51c60ffc3c744dedd2f012b5dc18",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4241,
"upload_time": "2015-04-30T22:26:11",
"url": "https://files.pythonhosted.org/packages/aa/e2/d19d5958ce9dad11f7aafa912b89370c62fadbdb9d214545ed83a4520e4c/max-django-mail-templated-1.0.tar.gz"
}
],
"1.1": [
{
"comment_text": "",
"digests": {
"md5": "276182f2392277161739286047064b28",
"sha256": "49a4520c88f75fd19f2b8327708cb3b8b78f86c2ae7010c6d774eb3d5cde703f"
},
"downloads": -1,
"filename": "max-django-mail-templated-1.1.tar.gz",
"has_sig": false,
"md5_digest": "276182f2392277161739286047064b28",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4236,
"upload_time": "2015-04-30T23:19:01",
"url": "https://files.pythonhosted.org/packages/83/57/3d6362dfd38dffdc8f2d946bdb67b990228630b06fcb2f84c12eeaef46fb/max-django-mail-templated-1.1.tar.gz"
}
],
"1.2": [
{
"comment_text": "",
"digests": {
"md5": "58eea3e6dde091681773fbb5904c7fc1",
"sha256": "761c28c32a4725673853cc4a40b810b1d552367143decf7d03e11185113a2028"
},
"downloads": -1,
"filename": "max-django-mail-templated-1.2.tar.gz",
"has_sig": false,
"md5_digest": "58eea3e6dde091681773fbb5904c7fc1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4246,
"upload_time": "2015-05-05T15:32:30",
"url": "https://files.pythonhosted.org/packages/31/44/0d51c9018da950b19c2c209fe4d8b475b343b7c139e6f37a251494ceedda/max-django-mail-templated-1.2.tar.gz"
}
],
"1.3": [
{
"comment_text": "",
"digests": {
"md5": "b9c8073d3ff4e3718fb507f315561a99",
"sha256": "f13389cbf2625dc8da2d2a4db7f7e12625fef0a6b9f53b579dbd5107f5357fd6"
},
"downloads": -1,
"filename": "max-django-mail-templated-1.3.tar.gz",
"has_sig": false,
"md5_digest": "b9c8073d3ff4e3718fb507f315561a99",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4251,
"upload_time": "2015-08-14T10:45:31",
"url": "https://files.pythonhosted.org/packages/dd/18/8f30fd31190bea5bb523ab1c8d31599da4845f021aa4f145742276cad6ec/max-django-mail-templated-1.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "b9c8073d3ff4e3718fb507f315561a99",
"sha256": "f13389cbf2625dc8da2d2a4db7f7e12625fef0a6b9f53b579dbd5107f5357fd6"
},
"downloads": -1,
"filename": "max-django-mail-templated-1.3.tar.gz",
"has_sig": false,
"md5_digest": "b9c8073d3ff4e3718fb507f315561a99",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4251,
"upload_time": "2015-08-14T10:45:31",
"url": "https://files.pythonhosted.org/packages/dd/18/8f30fd31190bea5bb523ab1c8d31599da4845f021aa4f145742276cad6ec/max-django-mail-templated-1.3.tar.gz"
}
]
}