diff --git a/docs/conf.py b/docs/conf.py index 8da9da6..c9401d4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -35,7 +35,7 @@ needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.intersphinx'] +extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.extlinks'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -256,6 +256,11 @@ texinfo_documents = [ # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' +# -- Options for extlinks --------------------------------------------------- + +extlinks = { + 'pypi': ('https://pypi.python.org/pypi/%s', ''), +} # -- Options for Intersphinx ------------------------------------------------ diff --git a/docs/esps/mandrill.rst b/docs/esps/mandrill.rst index 0df36b0..24c4b38 100644 --- a/docs/esps/mandrill.rst +++ b/docs/esps/mandrill.rst @@ -20,8 +20,7 @@ transactional email service from MailChimp. If you are integrating only Mandrill, and not considering one of Anymail's other ESPs, you might prefer using MailChimp's official - `mandrill `_ python package - instead of Anymail. + :pypi:`mandrill` python package instead of Anymail. Settings diff --git a/docs/esps/sparkpost.rst b/docs/esps/sparkpost.rst index db34d35..a7a6a78 100644 --- a/docs/esps/sparkpost.rst +++ b/docs/esps/sparkpost.rst @@ -4,16 +4,15 @@ SparkPost ========= Anymail integrates with the `SparkPost`_ email service, using their -`python-sparkpost`_ API client. +:pypi:`python-sparkpost` API client. .. _SparkPost: https://www.sparkpost.com/ -.. _python-sparkpost: https://pypi.python.org/pypi/sparkpost Installation ------------ -You must ensure the `sparkpost` package is installed to use Anymail's SparkPost +You must ensure the :pypi:`sparkpost` package is installed to use Anymail's SparkPost backend. Either include the "sparkpost" option when you install Anymail: .. code-block:: console diff --git a/docs/sending/anymail_additions.rst b/docs/sending/anymail_additions.rst index d4f5d86..264c603 100644 --- a/docs/sending/anymail_additions.rst +++ b/docs/sending/anymail_additions.rst @@ -468,7 +468,7 @@ AnymailMessageMixin Mixin class that adds Anymail's ESP extra attributes and convenience methods to other :class:`~django.core.mail.EmailMessage` subclasses. - For example, with the `django-mail-templated`_ package's custom EmailMessage: + For example, with the :pypi:`django-mail-templated` package's custom EmailMessage: .. code-block:: python @@ -489,6 +489,3 @@ AnymailMessageMixin ) msg.context = {"order_num": "12345"} # Mail-Templated attribute msg.tags = ["templated"] # Anymail attribute - - -.. _django-mail-templated: https://pypi.python.org/pypi/django-mail-templated diff --git a/docs/sending/django_email.rst b/docs/sending/django_email.rst index 1a01831..8d125c6 100644 --- a/docs/sending/django_email.rst +++ b/docs/sending/django_email.rst @@ -16,7 +16,7 @@ Anymail supports most of the functionality of Django's :class:`~django.core.mail and :class:`~django.core.mail.EmailMultiAlternatives` classes. Anymail handles **all** outgoing email sent through Django's -:mod:`django.core.mail` package, including :func:`~django.core.mail.send_mail`, +:mod:`django.core.mail` module, including :func:`~django.core.mail.send_mail`, :func:`~django.core.mail.send_mass_mail`, the :class:`~django.core.mail.EmailMessage` class, and even :func:`~django.core.mail.mail_admins`. If you'd like to selectively send only some messages through Anymail, diff --git a/docs/tips/django_templates.rst b/docs/tips/django_templates.rst index e923091..f0700a5 100644 --- a/docs/tips/django_templates.rst +++ b/docs/tips/django_templates.rst @@ -50,6 +50,7 @@ in Django: .. TODO: flesh this out -* django-templated-mail, django-mail-templated, django-mail-templated-simple -* Premailer, for inlining css -* BeautifulSoup, lxml, or html2text, for auto-generating plaintext from your html +* :pypi:`django-templated-mail`, :pypi:`django-mail-templated`, or :pypi:`django-mail-templated-simple` + for building messages from sets of Django templates. +* :pypi:`premailer` for inlining css before sending +* :pypi:`BeautifulSoup`, :pypi:`lxml`, or :pypi:`html2text` for auto-generating plaintext from your html