Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Django package for creating email marketing campaigns in Constant Contact

Project description

Build Status Coverage Status

django-constant-contact

Django package for creating email marketing campaigns in Constant Contact.

Inlines CSS into HTML before sending to Constant Contact.

Installation

Using pip:

pip install django-constant-contact

Settings

The following variables should be set in your settings.py:

CONSTANT_CONTACT_API_KEY
CONSTANT_CONTACT_ACCESS_TOKEN
CONSTANT_CONTACT_FROM_EMAIL
CONSTANT_CONTACT_REPLY_TO_EMAIL
CONSTANT_CONTACT_USERNAME
CONSTANT_CONTACT_PASSWORD

CONSTANT_CONTACT_API_KEY is assigned by Constant Contact when you register your application. (You need to register as a Constant Contact developer.)

CONSTANT_CONTACT_ACCESS_TOKEN is the access token granted to your application by a Constant Contact user. This is the User who will own the uploaded Constant Contact email marketing campaigns.

Usage Examples

Create a new marketing campaign:

email_content = "<html>....</html>"
text_content = "blah blah blah"
constant_contact = ConstantContact()

options = {name: , from_email: , email_content: , text_content:, ....}

try:
  campaign = constant_contact.new_email_marketing_campaign(options)
except ConstantContactAPIError as exc:
  print exc.errors

Update an existing campaign (stored in a model):

options['email_marketing_campaign'] = campaign
options['name'] = "new name"

try:
  constant_contact.update_email_marketing_campaign(options)
except ConstantContactAPIError as exc:
  print exc.errors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-constant-contact-1.5.tar.gz (8.2 kB) Copy SHA256 hash SHA256 Source None Sep 23, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page