README adjustments

This commit is contained in:
David Smejkal 2023-03-15 03:44:55 +00:00
parent 8991ce52d8
commit 3606f20796
1 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ Campaign templates are created using `mjml <https://mjml.io/>`_.
Basic usage
===========
Install Birdsong:
Install birdsong:
.. code-block:: shell
@ -55,6 +55,10 @@ Make a new app e.g. ``email``, create a ``models.py`` with a model that extends
Then in the same app, create a ``wagtail_hooks.py`` if it doesn't exist, this is where the admin is created
for content editors to create/edit/send campaigns.
**NOTE:** The ``CampaignAdmin`` is just an extension of Wagtail's ``ModelAdmin`` class so most of the same options are available for overriding functionality.
**NOTE:** ``BirdsongAdminGroup`` can be disabled with ``BIRDSONG_ADMIN_GROUP`` setting if you want to ``modeladmin_register`` your ``CampaignAdmin`` directly.
``wagtail_hooks.py``
.. code-block:: python
@ -71,15 +75,11 @@ for content editors to create/edit/send campaigns.
class BirdsongAdminGroup(BirdsongAdminGroup):
items = (CampaignAdmin, ContactAdmin)
:information_source: The ``CampaignAdmin`` is just an extension of Wagtail's ``ModelAdmin`` class so most of the same options are available for overriding functionality.
:information_source: ``BirdsongAdminGroup`` can be disabled with ``BIRDSONG_ADMIN_GROUP`` setting if you want to ``modeladmin_register`` your ``CampaignAdmin`` directly.
Create your campaign template in ``{app_folder}/templates/mail/{model_name}.html`` e.g. ``email/templates/mail/sale_campaign.html``,
alternatively override the ``get_template`` method on your campaign model.
:information_source: Campaign templates use django-mjml for responsive, well designed emails. To read up how to setup django-mjml you can read the docs
`here <https://github.com/liminspace/django-mjml>`_. There is a base template included in Birdsong that can be extended.
**NOTE:** Campaign templates use django-mjml for responsive, well designed emails. To read up how to setup django-mjml you can read the docs `here <https://github.com/liminspace/django-mjml>`_. There is a base template included in Birdsong that can be extended.
``sale_campaign.html``