To test out MailChimp's OAuth2 authentication with Django, just clone this project and replace a few variable and you're on your way.
-
Install the requirements by running
pip install -r requirements.txt
. You are using a virtualenv, right? -
In
settings.py
, edit the following variables to be custom to your app.MAILCHIMP_CLIENT_ID MAILCHIMP_CLIENT_SECRET
-
On MailChimp.com, in your app settings, make sure you have
http://127.0.0.1
as yourredirect_uri
setting. -
Set up the DB. Just run
python manage.py syncdb
from themailchimp_demo
directory. You don't need to create any superusers. -
Start the server with
python manage.py runserver
and loadhttp://127.0.0.1:8000/
in your browser of choice.
That's all!