{ "info": { "author": "Jonas Obrist et al.", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [], "description": "=====================\nDjango Mailchimp v1.3\n=====================\n\nThis is an integrated app for Django dealing with the Mailchimp mailing list system.\n\n.. warning::\n This package used to be called simply ``django-mailchimp``. But since the\n mailchimp API changed in non-backwards-compatible ways between v1.2 and v1.3,\n we renamed it to ``django-mailchimp-v1.3``.\n\n Stuff may break in funny ways with this release, so make sure to thoroughly\n test your code if you want to update from ``django-mailchimp``.\n\nQuick start guide:\n------------------\n\nInstallation:\n*************\n\n1. Install ``django-mailchimp-v1.3``::\n\n pip install django-mailchimp-v1.3\n\n2. Add a ``MAILCHIMP_API_KEY`` to your settings.py with your mailchimp API key as the value (obviously)\n\n3. Add ``mailchimp`` to your project's list of INSTALLED_APPS\n\n4. To start using the API, you should start by using utils.get_connection(). This will use the API_KEY you\njust defined in settings.py\n\n\nSubscribing a user to a list:\n*****************************\n\n1. To get the list::\n\n list = mailchimp.utils.get_connection().get_list_by_id()\n\n2. Now add a member to the mailing list::\n\n list.subscribe('example@example.com', {'EMAIL':'example@example.com'})\n\n\nThose pesky merge vars:\n-----------------------\n\nGeneral info:\n*************\n\nMailchimp is a quite generic service. As such, it needs to store information on people who subscribe to a list,\nand that information is specific to this very list!\n\nSo to help you build dynamic forms (presumabely), mailchimp added the merge_vars. They are, basically, a \ndictionnary showing infromation and meta-information defined for each piece of information.\nHere's what the default set of merge vars look like (ona brand new list with default options)::\n\n [\n {\n 'field_type': 'email', \n 'name': 'Email Address', \n 'show': True, \n 'default': None, \n 'req': True, \n 'public': True, \n 'tag': 'EMAIL', \n 'helptext': None, \n 'order': '1', \n 'size': '25'\n },{\n 'field_type': 'text', \n 'name': 'First Name', \n 'show': True, \n 'default': '', \n 'req': False, \n 'public': True, \n 'tag': 'FNAME', \n 'helptext': '', \n 'order': '2', \n 'size': '25'\n },{\n 'field_type': 'text', \n 'name': 'Last Name', \n 'show': True, \n 'default': '', \n 'req': False, \n 'public': True, \n 'tag': 'LNAME', \n 'helptext': '', \n 'order': '3', \n 'size': '25'\n }\n ]\n\nAs you can see, it's a list of 3 dictionnaries, each containing several fields that you should use to build your \nuser interface with (since you're using this app, that means your Django form).\n\nObtaining them:\n***************\n\nYou can recreate this list using the following API call::\n\n list = mailchimp.utils.get_connection().get_list_by_id()\n print list.merges\n\n\nUsing them:\n***********\n\nWhen you make a post to mailchimp, you need to pass merge_vars. For example, in a new list created with the default\nsettings on the mailchimp website, the following call adds a member to a list (with a little more info than our bare minimum example up there)::\n\n list = mailchimp.utils.get_connection().get_list_by_id()\n list.subscribe('example@example.com', {'EMAIL': 'example@example.com', 'FNAME': 'Monthy', 'LNAME': 'Pythons'})\n\nNote the use of the 'tag' field as the key for fields (why they didn't call it 'key' or 'id' is beyond comprehension).\n\n\n\nCreate a view:\n--------------\n\nWe'll now try to move up the stack and create the necessary elements to make a useable mailchimp interface\n\nFire up your favorite editor and open your views.py. Put in the following snippet of code::\n\n from django.http import HttpResponseRedirect\n from mailchimp import utils\n\n MAILCHIMP_LIST_ID = 'spamspamspamspameggsspamspam' # DRY :)\n REDIRECT_URL_NAME = '/mailing_list_success/'\n def add_email_to_mailing_list(request):\n if request.POST['email']:\n email_address = request.POST['email']\n list = utils.get_connection().get_list_by_id(MAILCHIMP_LIST_ID)\n list.subscribe(email_address, {'EMAIL': email_address})\n return HttpResponseRedirect('/mailing_list_success/')\n else:\n return HttpResponseRedirect('/mailing_list_failure/')\n\nOf course, if you feel redirecting the user is not the right approach (handling a form might be a good idea), feel\nfree to adapt this simple example to your needs :p\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/divio/django-mailchimp", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-mailchimp-v1.3", "package_url": "https://pypi.org/project/django-mailchimp-v1.3/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-mailchimp-v1.3/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/divio/django-mailchimp" }, "release_url": "https://pypi.org/project/django-mailchimp-v1.3/1.4.0/", "requires_dist": null, "requires_python": null, "summary": "Mailchimp wrapper for Django, using Mailchimp API 1.3", "version": "1.4.0" }, "last_serial": 2410839, "releases": { "1.3.0": [ { "comment_text": "", "digests": { "md5": "56d5723c8d61ffc20d2644491d59b822", "sha256": "a0a2c9fdf6ef6133b8ade52e8a1cf4ca5081290db288f08cb2b8a3bf47017eda" }, "downloads": -1, "filename": "django-mailchimp-v1.3-1.3.0.tar.gz", "has_sig": false, "md5_digest": "56d5723c8d61ffc20d2644491d59b822", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31070, "upload_time": "2012-10-02T09:56:27", "url": "https://files.pythonhosted.org/packages/4c/d5/50302b485ec44ffa2fdb4d257b79a0141988983844a2b20f35170a28a907/django-mailchimp-v1.3-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "02d38248ebfdc099dfd75306dc4ba6df", "sha256": "78dc00e135da380b09ba3824193fd006a78eeebcd0644e2437ce74f96dc0b1f9" }, "downloads": -1, "filename": "django-mailchimp-v1.3-1.3.1.tar.gz", "has_sig": false, "md5_digest": "02d38248ebfdc099dfd75306dc4ba6df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32586, "upload_time": "2014-01-09T14:49:22", "url": "https://files.pythonhosted.org/packages/f9/ff/1fedd270341e7d30e678cab4ebf14158ce6f481dbed1ab9b44be76fdaae3/django-mailchimp-v1.3-1.3.1.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "bda82f51a36b52317d42043d9e251205", "sha256": "fe2fa04ab4368f45ba0bcf642f681cc3e409035d8e24fb02b287cb6cac3e1f7c" }, "downloads": -1, "filename": "django_mailchimp_v1.3-1.4.0-py2-none-any.whl", "has_sig": false, "md5_digest": "bda82f51a36b52317d42043d9e251205", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 49597, "upload_time": "2016-10-19T15:48:54", "url": "https://files.pythonhosted.org/packages/85/3d/8215c535d301524657f904d1fd4a799563aca8c68e54736b568e0d76c7ba/django_mailchimp_v1.3-1.4.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3705a5d9c3d5cfb95243c94ddb8612a5", "sha256": "1e1fdfa35ddfbccf60607ec770194a71dcb122c66c79cff351bcba3016a60a08" }, "downloads": -1, "filename": "django-mailchimp-v1.3-1.4.0.tar.gz", "has_sig": false, "md5_digest": "3705a5d9c3d5cfb95243c94ddb8612a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31783, "upload_time": "2016-10-19T15:48:52", "url": "https://files.pythonhosted.org/packages/58/31/e5e3e4dfb38b28d03ed7176b1e676f52e8a7ccbd009cc3f476b1505591f9/django-mailchimp-v1.3-1.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bda82f51a36b52317d42043d9e251205", "sha256": "fe2fa04ab4368f45ba0bcf642f681cc3e409035d8e24fb02b287cb6cac3e1f7c" }, "downloads": -1, "filename": "django_mailchimp_v1.3-1.4.0-py2-none-any.whl", "has_sig": false, "md5_digest": "bda82f51a36b52317d42043d9e251205", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 49597, "upload_time": "2016-10-19T15:48:54", "url": "https://files.pythonhosted.org/packages/85/3d/8215c535d301524657f904d1fd4a799563aca8c68e54736b568e0d76c7ba/django_mailchimp_v1.3-1.4.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3705a5d9c3d5cfb95243c94ddb8612a5", "sha256": "1e1fdfa35ddfbccf60607ec770194a71dcb122c66c79cff351bcba3016a60a08" }, "downloads": -1, "filename": "django-mailchimp-v1.3-1.4.0.tar.gz", "has_sig": false, "md5_digest": "3705a5d9c3d5cfb95243c94ddb8612a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31783, "upload_time": "2016-10-19T15:48:52", "url": "https://files.pythonhosted.org/packages/58/31/e5e3e4dfb38b28d03ed7176b1e676f52e8a7ccbd009cc3f476b1505591f9/django-mailchimp-v1.3-1.4.0.tar.gz" } ] }