{ "info": { "author": "a_igin", "author_email": "a_igin@mail.ru", "bugtrack_url": null, "classifiers": [], "description": "=====\nmailchimp_sender_package\n=====\n\n\nQuick start\n-----------\n0. Install package::\n\tpip install mailchimpworker\n\n1. Add \"mailchimp_sender_package\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = [\n ...\n 'mailchimpworker',\n ...\n ]\n\n2. Make migrations::\n\tpython manage.py makemigrations mailchimpworker\n\tpython manage.py migrate\n\n3. Add the MAILCHIMP_API_KEY in settings.py::\n\tMAILCHIMP_API_KEY = 'YOUR API KEY'\n\n4. Create into folder with settings.py, wsgi.py and etc. file 'celery.py' with this content::\n\n\tfrom __future__ import absolute_import, unicode_literals\n\timport os\n\tfrom celery import Celery\n\tfrom celery.schedules import crontab\n\n\tos.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"[proj_name].settings\") # insert project name instead of \"[proj_name]\"\n\n\tapp = Celery('[proj_name]') # insert project name instead of \"[proj_name]\"\n\tapp.config_from_object('django.conf:settings', namespace='CELERY')\n\tapp.conf.broker_url = 'redis://localhost:6379/0'\n\tapp.conf.beat_schedule = {\n\t 'mailchimpworker.tasks.send_new_emails': {\n\t 'task': 'mailchimpworker.tasks.send_new_emails',\n\t 'schedule': crontab(minute=0),\n\t 'args': ([YOUR_LIST_ID], [YOUR_CATEGORY_ID], [YOUR_INTEREST_ID]) # that should be strings, not lists\n\t },\n\t}\n\tapp.autodiscover_tasks()\n\n5. Write view for creating objects of model Subscriber and bind him with forms. Example of view::\n\n\tfrom django.shortcuts import render\n\tfrom mailchimpworker.models import Subscriber\n\n\tdef new_subscriber(request):\n\t data_email = request.POST.get('EMAIL')\n\t unique_check = Subscriber.objects.filter(email=data_email)\n\t if not len(unique_check):\n\t Subscriber.objects.create(email=data_email)\n\t return render(request, '[path_to_\"thanks\"_template].html', {})\n\nP.S. To run scripts correctly, you need to run Celery-worker:\ncelery -A [proj_name] worker -l info -B", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "mailchimpworker", "package_url": "https://pypi.org/project/mailchimpworker/", "platform": "", "project_url": "https://pypi.org/project/mailchimpworker/", "project_urls": null, "release_url": "https://pypi.org/project/mailchimpworker/0.17/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.17" }, "last_serial": 3385101, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "1fab8e9ea0cb66a6b2cf3fde42de233f", "sha256": "fbba5f20e75e40fb9ac8afff4c914c1ab5bce3fcdee0ea727fae271ef19d714e" }, "downloads": -1, "filename": "mailchimpworker-0.1.tar.gz", "has_sig": false, "md5_digest": "1fab8e9ea0cb66a6b2cf3fde42de233f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3757, "upload_time": "2017-11-20T08:42:25", "url": "https://files.pythonhosted.org/packages/6f/9c/c1498ee9ee90705a76f6fd5f57bbf5a7d9ff3a87df171d9ee58415853f2c/mailchimpworker-0.1.tar.gz" } ], "0.11": [ { "comment_text": "", "digests": { "md5": "71166b4bc1b393d07624e3a52148f399", "sha256": "1b1ea93de79248cf9ca474f6d6a722e09e2371c5123c33d560ffe7a3c32234b2" }, "downloads": -1, "filename": "mailchimpworker-0.11.tar.gz", "has_sig": false, "md5_digest": "71166b4bc1b393d07624e3a52148f399", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3697, "upload_time": "2017-11-20T11:17:00", "url": "https://files.pythonhosted.org/packages/c6/60/0e8137a6cbe1f6a9f91ea4c82141af1aa68083cdd06924551d2a32ea2978/mailchimpworker-0.11.tar.gz" } ], "0.12": [ { "comment_text": "", "digests": { "md5": "9e38286de22fc3b96c5d6c0dd9001001", "sha256": "deaf21c6d0410457dacfb707ff3fda6b40b698a94add5043fa0971cef2a56a9d" }, "downloads": -1, "filename": "mailchimpworker-0.12.tar.gz", "has_sig": false, "md5_digest": "9e38286de22fc3b96c5d6c0dd9001001", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3748, "upload_time": "2017-11-20T16:52:27", "url": "https://files.pythonhosted.org/packages/b1/06/25eff8e0ff316e71f1f71b9dbf306026f9dbd41541198ec04715e0622644/mailchimpworker-0.12.tar.gz" } ], "0.13": [ { "comment_text": "", "digests": { "md5": "b142f64826b94b8c949472943a7c9ea4", "sha256": "825aefc8230a9a16eeeca259decbc2a491bf7c12a7cbbba5f3d2cc54fa1d2f4c" }, "downloads": -1, "filename": "mailchimpworker-0.13.tar.gz", "has_sig": false, "md5_digest": "b142f64826b94b8c949472943a7c9ea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3775, "upload_time": "2017-11-20T17:13:00", "url": "https://files.pythonhosted.org/packages/be/e1/1c52d6fbe650144047ccc9055b12e43b1dc2b50315284121d86eedf88ccc/mailchimpworker-0.13.tar.gz" } ], "0.14": [ { "comment_text": "", "digests": { "md5": "9428adfde8a2693d043e1511c1d3cd65", "sha256": "c5165cf736034176a7baf3ca17a383e66bcfe78231bd2a424fe5618d7ab3f1d2" }, "downloads": -1, "filename": "mailchimpworker-0.14.tar.gz", "has_sig": false, "md5_digest": "9428adfde8a2693d043e1511c1d3cd65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3733, "upload_time": "2017-11-20T17:26:56", "url": "https://files.pythonhosted.org/packages/52/c7/5981097acf60626f4d359295ae6962d4e0427bae92ad474393432289b59f/mailchimpworker-0.14.tar.gz" } ], "0.15": [ { "comment_text": "", "digests": { "md5": "aedaa79d0c6df7accdcb410194b486bc", "sha256": "a2b2fef5fba77e51b293097eb8c6a3100782550723df50af4b986b89726fc167" }, "downloads": -1, "filename": "mailchimpworker-0.15.tar.gz", "has_sig": false, "md5_digest": "aedaa79d0c6df7accdcb410194b486bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3709, "upload_time": "2017-11-20T17:33:10", "url": "https://files.pythonhosted.org/packages/b1/54/d15fcc723e9559b999177fce13025a6e126952feb12bf4cdcfda8180cb4a/mailchimpworker-0.15.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "ccc6d35294fc6ea2c79b5d31720023fb", "sha256": "f6c30392e06f72166057be03d3628b6c19c08ac1940342ca87d66073c5b056ae" }, "downloads": -1, "filename": "mailchimpworker-0.16.tar.gz", "has_sig": false, "md5_digest": "ccc6d35294fc6ea2c79b5d31720023fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3785, "upload_time": "2017-11-20T17:42:54", "url": "https://files.pythonhosted.org/packages/e3/1d/3f911a97779085a91f89febe9f88ffa378c5d6f8f35ed7f5de79bc8d44eb/mailchimpworker-0.16.tar.gz" } ], "0.17": [ { "comment_text": "", "digests": { "md5": "fdd3007445ffd7dc145669521780303c", "sha256": "96287862aa15b6a8ce9a051b6a95678275795d1628112af4c10c76db0af39044" }, "downloads": -1, "filename": "mailchimpworker-0.17.tar.gz", "has_sig": false, "md5_digest": "fdd3007445ffd7dc145669521780303c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3783, "upload_time": "2017-12-03T18:21:06", "url": "https://files.pythonhosted.org/packages/af/7c/020b37e4e5fbdb7b55333f83c0ee0bcac7e074a024adb75782fc9128630d/mailchimpworker-0.17.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fdd3007445ffd7dc145669521780303c", "sha256": "96287862aa15b6a8ce9a051b6a95678275795d1628112af4c10c76db0af39044" }, "downloads": -1, "filename": "mailchimpworker-0.17.tar.gz", "has_sig": false, "md5_digest": "fdd3007445ffd7dc145669521780303c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3783, "upload_time": "2017-12-03T18:21:06", "url": "https://files.pythonhosted.org/packages/af/7c/020b37e4e5fbdb7b55333f83c0ee0bcac7e074a024adb75782fc9128630d/mailchimpworker-0.17.tar.gz" } ] }