Giter Club home page Giter Club logo

django-mailchimp-amp's Introduction

GPL3 License Pypi packaged release Build status Documentation Code Coverage Maintainability Requirements Status Contributions welcome

Django Mailchimp AMP embedded subscription form

Django app for easy embedding of the Mailchimp subscription form to AMP pages.

Quick start

  1. Install django-mailchimp-amp:

    pip install django-mailchimp-amp

    or from sources

    pip install git+https://github.com/letme/django-mailchimp-amp
  2. Add django-mailchimp-amp to INSTALLED_APPS in your Django settings.py. Also make sure you add your MailChimp api key, username and listids

    INSTALLED_APPS = [
           ...
           'django-mailchimp-amp',
       ]
    MAILCHIMP_API = 'yourmailchimpapikey'
    MAILCHIMP_USERNAME = 'yourmailchimp@mail'
    MAILCHIMP_LISTID = 'mailchimplistid'
  3. Add django-mailchimp-amp to urlpatterns in your project urls.py:

    urlpatterns = [
        ...
        path('mailchimp/', include('django-mailchimp-amp.urls')),
    ]
  4. Add template tags to your templates where you want subscription form to be presented:

    <head>
        <!-- if you did not include amp-form and amp-mustache for anything else -->
        {% include "django-mailchimp-amp/scripts_form.html" %}
    
        <style amp-custom>
        /* Include default form style template */
                    {% include "django-mailchimp-amp/style_form.css" %}
        </style>
    </head>
    <body>
        <!-- Include the subscription form where pre_subscribe_text appears above/before the subscription form -->
            {% include "django-mailchimp-amp/subscribe_form.html" with mailchimp_pre_subscribe_text="If you want to receive our awesome stuff you can subscribe to our newsletter:" %}
    </body>

Contributing

Any contribution is welcome as well as reporting issues/bugs or requesting features. Do not be shy and open a pull request and I will do my best to help you include your contribution into the repository. Keep in mind that reporting a bug or requesting a feature is also considered as contribution, even if you do not have development skills to implement it.

Development setup

To run tests and checks we use tox.

# to install tox
pip3 install tox

# to run tests
tox

django-mailchimp-amp's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

django-mailchimp-amp's Issues

Write tutorial about setup

First touch tutorial of how to setup plugin and put it into your html page. It needs to be in personal note and contain step by step until end result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.