Skip to content

Mailchimp stupid integration for Django - add email addresses to a given list

Notifications You must be signed in to change notification settings

GeoSchool/django-mailchimp3-emailcollector

Repository files navigation

Mailchimp Django integration

Class to add emails to Mailchimp lists.

Install

pip install git+https://github.com/GeoSchool/django-mailchimp3-emailcollector.git

Add mailchimp3 to your INSTALLED_APPS, then define the MAILCHIMP_API_KEY setting.

Usage

# Initialize the integration
mc = Mailchimp()
# Trigger the action on the given list
added = mc.add_member_to_list(settings.MAILCHIMP_LIST_ID, email)
if added:
    print("Email successfully added")

Running tests

virtualenv --python=python3 env
source env/bin/activate
pip install -r requirements-test.txt
python tests.py

You can also run the coverage:

coverage run tests.py
# Display the results
coverage report -m

About

Mailchimp stupid integration for Django - add email addresses to a given list

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages