سؤال

Any one has got idea about,How to Integrate mail chimp api into django app? i have installed django-mailchimp-v1.3 on my app, but not able to proceed with the rest(views an all), How to add contacts(list) to the mailing list? Mail chimp documentation has got less details.

هل كانت مفيدة؟

المحلول

I would take a look at the following page of the author:

https://github.com/piquadrat/django-mailchimp#using-them

There is a nice example of how to add/subscribe to the mailing list.

نصائح أخرى

Another option would be to use MailSnake.

https://github.com/michaelhelmick/python-mailsnake

django-mailchimp-v1.3 by default doesn't support django 1.7 and above. There is extended version with added support for 1.7 and probably above versions. It can be installed using:

pip install git+https://github.com/ephemerallabs/django-mailchimp.git

Instead of using django-mailchimp package use mailchimp package for integrating MailChimp to your Django site.

First, you have create an account on MailChimp, create the List there, and thereafter get the List Key and API key of your account.

Install the package to integrate MailChimp into your Django site

pip install mailchimp

Then send a request to connect with your list in MailChimp

import mailchimp

API_KEY = <<Your MailChimp API Key>>
LIST_ID = <<Your List Key>>
api = mailchimp.Mailchimp(API_KEY)
api.lists.subscribe(LIST_ID, {'email': 'xyz@gmail.com'})

Full Tutorial on this Topic: https://djangopy.org/package-of-week/how-to-integrate-mailchimp-on-django-to-increase-subscribers/

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top