{ "info": { "author": "Association Prologin", "author_email": "info@prologin.org", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 2.1", "Framework :: Django :: 2.2", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Communications :: Email", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# django-massmailer\n\n[![Build Status](https://travis-ci.com/prologin/django-massmailer.svg?branch=master)](https://travis-ci.com/prologin/django-massmailer)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n`django-massmailer` is a standalone Django app that you can plug in your\nwebsite to send e-mails in bulk. It features:\n\n- An **e-mail template engine** to write your e-mail template, supporting both\n plaintext and HTML, with a live preview:\n\n ![Template engine demo](https://github.com/prologin/django-massmailer/raw/master/doc/template_demo.gif)\n\n- A **query language** to select the subset of users you want to send e-mails\n to, and preview the list of selected users:\n\n ![Query language demo](https://github.com/prologin/django-massmailer/raw/master/doc/query_demo.gif)\n\n- A **batch status report** that shows how many e-mails have been sent, and is\n able to track bounces.\n\n ![Batch status demo](https://github.com/prologin/django-massmailer/raw/master/doc/batch_demo.png)\n\n\n## Installation\n\nFirst, install `django-massmailer` and its Python dependencies:\n\n```\npip install django-massmailer\n```\n\nThen, add `massmailer` and its Django dependencies to your project's\n`INSTALLED_APPS`:\n\n```python\nINSTALLED_APPS = (\n # ...\n 'massmailer',\n 'crispy_forms',\n 'django_bootstrap_breadcrumbs',\n 'reversion',\n)\n```\n\nAdd the following URL pattern to your `urls.py` to put the mailing\ndashboard in `/mailing`:\n\n```python\nurlpatterns = [\n # ...\n path('mailing', include('massmailer.urls')),\n]\n```\n\nThen, execute the migrations to create the massmailer models:\n\n```bash\npython3 manage.py migrate\n```\n\nYou also need to have a working Celery setup with your website.\nYou can check out the [official\ntutorial](https://docs.celeryproject.org/en/latest/django/first-steps-with-django.html)\nto setup Celery in your Django website, or just look at how we do it in our demo\napplication:\n\n- [`demoapp/__init__.py`](https://github.com/prologin/django-massmailer/blob/master/demoapp/demoapp/__init__.py)\n- [`demoapp/celery.py`](https://github.com/prologin/django-massmailer/blob/master/demoapp/demoapp/celery.py)\n- [`demoapp/settings.py`](https://github.com/prologin/django-massmailer/blob/master/demoapp/demoapp/settings.py)\n\n## How to use\n\n### Permissions\n\nOnly staff users can see the mailing dashboard. By default, only superusers can\nuse anything in massmailer. There are three categories of permissions you\ncan grant to some staff users to allow them to make changes:\n\n- `mailing.{view,create,change,delete}_template` to view, create, change and\n delete templates.\n- `mailing.{view,create,change,delete}_query` to view, create, change and\n delete queries.\n **\u26a0 These permissions give access to personal user data. \u26a0**\n- `mailing.{view,create,change,delete}_batch` to view, send, change and\n delete batches.\n **\u26a0 These permissions give access to sending bulk e-mails. \u26a0**\n\nBecause `django-massmailer` intrinsically gives access to powerful features\n(access to user data and sending e-mails in bulk) it is strongly recommended to\nbe as restrictive as possible when granting these permissions to prevent abuse\nor spam.\n\n### Query syntax\n\n`django-massmailer` allows you to write queries in a domain-specific language\nto select the users you want to reach. You can think of it as heavily\nsimplified SQL with a syntax that looks like filters in the Django ORM.\n\nHere is a short demonstration of the syntax:\n\n```python\nSomeModel [as name]\n .field = 42\n (.field contains \"string\" or\n .field contains i\"case insensitive\")\n count(.related_field) > 10\n\nalias some_name = .some_field\n```\n\nFilters are implicity joined by the and operator. If you are not querying on\nthe User model directly, you must create a user alias targeting a field\ncontaining the related user.\n\n### Templates\n\nTemplates use the [Jinja2 templating engine](http://jinja.pocoo.org/) to\ngenerate the contents of the e-mails. The model selected in your query will be\npassed directly in the context of the template, as well as the different\naliases that were defined in the query.\n\nThere are three templates you have to fill, one for the subject line, one for\nthe plaintext content, and optionally one for the HTML content. The HTML\ntemplate can also be generated directly from the plaintext e-mail.\n\nExample:\n\n```jinja\nGreetings, {{ user.get_full_name().strip().title() }}!\n\n{% if user.is_staff %}With great power comes great responsibility.{% endif %}\n```\n\n#### Template filters\n\nIn addition to the Jinja2 [builtin\nfilters](http://jinja.pocoo.org/docs/2.10/templates/#builtin-filters),\n`django-massmailer` provides a few other convenience filters.\n\nThe following filters are directly passed to the [Babel functions of the same\nname](http://babel.pocoo.org/en/latest/api/dates.html) using the locale set in\ntemplate:\n\n- `format_date`: formats the date according to a given pattern.\n- `format_time`: formats the time according to a given pattern.\n- `format_datetime`: formats the datetime according to a given pattern.\n\nExample:\n\n```jinja\nYou have joined our website on {{ user.date_joined|format_date }}.\n```\n\n## Contributing\n\n`django-massmailer` enforces various style constraints. You need to install\npre-commit hooks to make sure your commits respect them:\n\n```bash\npip install -r requirements-dev.txt\npre-commit install\n```\n\n## Licence\n\n`django-massmailer` is distributed under the GPLv3 licence.\n\n- Copyright (C) 2016 Alexandre Macabies\n- Copyright (C) 2016 Antoine Pietri\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see .\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "GPL3", "maintainer": "", "maintainer_email": "", "name": "django-massmailer", "package_url": "https://pypi.org/project/django-massmailer/", "platform": "", "project_url": "https://pypi.org/project/django-massmailer/", "project_urls": { "Issue Tracker": "https://github.com/prologin/django-massmailer/issues", "Source": "https://github.com/prologin/django-massmailer/" }, "release_url": "https://pypi.org/project/django-massmailer/0.5/", "requires_dist": [ "babel", "bleach", "celery (>4)", "django-bootstrap-breadcrumbs", "django-crispy-forms", "django-reversion", "django (>=2.1)", "jinja2", "markdown", "pyparsing" ], "requires_python": "", "summary": "A standalone Django app to send templated emails in batch. Features a custom query engine and template editor with preview.", "version": "0.5" }, "last_serial": 5609719, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "347dd28e68f1a9bc3ef1296d90aed014", "sha256": "7674e7c7ccec30cadd0e815e7618e77a0387ebd0f34ec7d4a0325798f571b567" }, "downloads": -1, "filename": "django_massmailer-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "347dd28e68f1a9bc3ef1296d90aed014", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 28755, "upload_time": "2019-07-21T20:54:30", "url": "https://files.pythonhosted.org/packages/d5/69/70d47e18e4d3007fb6f41bf0797d94cac6d04b7777c23fc13535011b7a89/django_massmailer-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bec9620bbd8cfd5cdf692884bb65ffb5", "sha256": "6606045f54cac8bdedb691aa79b874b56d8a3241777f93570ab99d1163a1a078" }, "downloads": -1, "filename": "django-massmailer-0.1.tar.gz", "has_sig": false, "md5_digest": "bec9620bbd8cfd5cdf692884bb65ffb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14865, "upload_time": "2019-07-21T20:54:32", "url": "https://files.pythonhosted.org/packages/fe/dd/5f6891572b05e7d255360723c60da5fad71d9b59eb7cdc0f4d5127de76c2/django-massmailer-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "44a24d389d55f4e32a28b6282b0980f4", "sha256": "c505b013a0de8d7ae2fbb75579cf9e9e29d04d875cea4e744d62b5cbea679a0e" }, "downloads": -1, "filename": "django_massmailer-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "44a24d389d55f4e32a28b6282b0980f4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 31486, "upload_time": "2019-07-30T18:18:41", "url": "https://files.pythonhosted.org/packages/8b/03/2706a800bc3e22d564ce287b61ee613777d2d0dffbe58c6f646a785aa079/django_massmailer-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ac72621a64b92464b9bbc14182d0485", "sha256": "4f8cfd5b34319478f987d4b7d112f52d1114c6fe3806a0212a212f9c4be6b7a1" }, "downloads": -1, "filename": "django-massmailer-0.2.tar.gz", "has_sig": false, "md5_digest": "1ac72621a64b92464b9bbc14182d0485", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17318, "upload_time": "2019-07-30T18:18:42", "url": "https://files.pythonhosted.org/packages/0e/9d/aa184d5e6d20a88a53c03645e617ac23e07ace48fbb3ce7e15a26101911b/django-massmailer-0.2.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "4eb396cc1eb93e9e8937ccca2941e17e", "sha256": "b97c45a3226c8ead0483e0d460699fd2659a912e57d223a3a3ae6072c786ce0b" }, "downloads": -1, "filename": "django_massmailer-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "4eb396cc1eb93e9e8937ccca2941e17e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 891638, "upload_time": "2019-07-30T19:49:52", "url": "https://files.pythonhosted.org/packages/6e/29/fec58c46a804d810d577ebd9b6291ed895e187c8f853cb5da0d88e50798b/django_massmailer-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c81abfe3d09f2a6fb4087771b7a7fdb", "sha256": "8b90afbc28b91761809fbf1e4765273f2addb740f5aaa3c518f23710950c9159" }, "downloads": -1, "filename": "django-massmailer-0.4.tar.gz", "has_sig": false, "md5_digest": "1c81abfe3d09f2a6fb4087771b7a7fdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 880564, "upload_time": "2019-07-30T19:49:55", "url": "https://files.pythonhosted.org/packages/d8/cc/d3519ebf41cef07872ec076c5d85b07a7c5db004ed72a36ce1cbf2cd67f0/django-massmailer-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "4fa6401a8930955268343ac696112301", "sha256": "2d5416359f8caf3ff4199d8c0e7f20aebbabb136ef6c022579af09a474210aeb" }, "downloads": -1, "filename": "django_massmailer-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4fa6401a8930955268343ac696112301", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 906542, "upload_time": "2019-07-30T19:56:11", "url": "https://files.pythonhosted.org/packages/9a/7f/326a02807cf51603e19674b37d07aefa21123e6cc14198fd09ab0a5eef42/django_massmailer-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac0932117ddab6e8f37477582b0579f5", "sha256": "94e66aab9ac959ff0c738d39cae76f9892669e9b0237a28d19b81add1a55c97c" }, "downloads": -1, "filename": "django-massmailer-0.5.tar.gz", "has_sig": false, "md5_digest": "ac0932117ddab6e8f37477582b0579f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 892836, "upload_time": "2019-07-30T19:56:14", "url": "https://files.pythonhosted.org/packages/3e/ab/28600bedaef1b6fdcdd445b0decae4d0051949d789aced95188440d6a9b0/django-massmailer-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4fa6401a8930955268343ac696112301", "sha256": "2d5416359f8caf3ff4199d8c0e7f20aebbabb136ef6c022579af09a474210aeb" }, "downloads": -1, "filename": "django_massmailer-0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "4fa6401a8930955268343ac696112301", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 906542, "upload_time": "2019-07-30T19:56:11", "url": "https://files.pythonhosted.org/packages/9a/7f/326a02807cf51603e19674b37d07aefa21123e6cc14198fd09ab0a5eef42/django_massmailer-0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac0932117ddab6e8f37477582b0579f5", "sha256": "94e66aab9ac959ff0c738d39cae76f9892669e9b0237a28d19b81add1a55c97c" }, "downloads": -1, "filename": "django-massmailer-0.5.tar.gz", "has_sig": false, "md5_digest": "ac0932117ddab6e8f37477582b0579f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 892836, "upload_time": "2019-07-30T19:56:14", "url": "https://files.pythonhosted.org/packages/3e/ab/28600bedaef1b6fdcdd445b0decae4d0051949d789aced95188440d6a9b0/django-massmailer-0.5.tar.gz" } ] }