{ "info": { "author": "Richard Case", "author_email": "rich@racitup.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Application Frameworks" ], "description": "djangoshop-subscribe\n====================\n\nDjango-SHOP plugin for email subscriptions\n\nIntroduction\n------------\n\nThis plugin allows Django-SHOP implementations to add email\nsubscriptions for their customers.\n\nThe module is currently compatible with Django v1.10.7. This\ndocumentation assumes a working knowledge of Django and\n`Django-SHOP `__.\n\nRelease History\n~~~~~~~~~~~~~~~\n\n- 0.2.x - `Django-SHOP `__ v0.11.x compatibility\n- 0.1.x - `Django-SHOP `__ v0.10.2 compatibility\n\nFeatures\n~~~~~~~~\n\nThis plugin currently has the following features:\n\n- Django-angular & bootstrap3 based subscription and confirmation forms\n that can be included in normal templates.\n- Automatic pickup of any Customer model fields that start with\n ``subscription_`` for inclusion in forms.\n- A CMS plugin for inclusion of either form in CMS placeholders.\n- Default confirmation and subscription management form, or use your\n own page.\n- A minimal customer form for the standard Django-SHOP checkout to\n prevent all fields annoying customers on every checkout.\n- Email link authentication for management of subscriptions.\n- Overridable forms and email templates including `Email\n Framework `__ compatibility\n with the majority of email clients.\n- Rate limit for subscriptions from each ip address.\n- Email integration with post_office templates.\n\nTODO\n~~~~\n\nPlease let me know of you have any feature suggestions, or wish to\nimplement any of the below:\n\n- Admin interface to allow emails to be authored and sent out to\n subscribed users.\n- Tests.\n- Remove included email framework.\n- Continuous build integration including compatibility testing with\n various python, Django and Django-SHOP versions.\n\nIntegration Guide\n-----------------\n\nPlease follow the guide below to integrate the plugin into your own\nshop.\n\nConfiguration\n~~~~~~~~~~~~~\n\nPlease add the following to your Django settings. If you do not use CMS\nyou do not need the CMS plugin.\n\n.. code:: python\n\n INSTALLED_APPS = [\n ...\n 'shop',\n 'shop_subscribe',\n ...\n ]\n\n CMSPLUGIN_CASCADE_PLUGINS = [\n ...\n 'shop_subscribe.cmsplugin_cascade',\n ]\n\nA logging configuration similar to below is also recommended to catch a few warnings\ngiven off by this module. This configuration will also catch messages given off by\nother modules for which there is no specific configuration. If you want to add a\nspecific configuration for this module, use the module name ``shop_subscribe``.\n\n.. code:: python\n\n LOGGING = {\n 'version': 1,\n # Use False to see deprecation warnings, etc\n 'disable_existing_loggers': False,\n 'filters': {\n 'require_debug_false': {\n '()': 'django.utils.log.RequireDebugFalse',\n }\n },\n 'formatters': {\n 'simple': {\n 'format': '[%(asctime)s %(name)s] %(levelname)s: %(message)s'\n },\n },\n 'handlers': {\n 'console': {\n 'level': 'INFO',\n 'class': 'logging.StreamHandler',\n 'formatter': 'simple',\n },\n },\n 'loggers': {\n '': {\n 'handlers': ['console'],\n # default is WARNING\n 'level': 'INFO',\n },\n },\n }\n\nCustomer Model\n~~~~~~~~~~~~~~\n\nFor the subscription plugin to work, you must create your own customer\nmodel that extends the provided shop customer model. There are two\nrequirements:\n\n- Add the ``SubscriptionCustomerManagerMixin`` to a manager class\n- Add your own subscription options to the customer model which MUST be\n prefixed with ``subscription_``\n\nFor example:\n\n.. code:: python\n\n from shop.models.customer import BaseCustomer, CustomerManager as BaseCustomerManager\n from shop_subscribe.models import SubscriptionCustomerManagerMixin\n\n\n class CustomerManager(SubscriptionCustomerManagerMixin, BaseCustomerManager):\n pass\n\n class Customer(BaseCustomer):\n \"\"\"\n Specialised customer class for our additional fields\n \"\"\"\n subscription_newsletter = models.BooleanField(_(\"Newsletter\"), default=True,\n help_text=_(\"Company news subscription\"))\n subscription_cart_products = models.BooleanField(_(\"Watched Product Updates\"), default=True,\n help_text=_(\"Subscription to product developments in your watch list or shopping trolley\"))\n subscription_order_products = models.BooleanField(_(\"Purchased Product Updates\"), default=False,\n help_text=_(\"Subscription to product developments you have purchased\"))\n\n objects = CustomerManager()\n\nThe subscription management form will use the default Django modelform\nfields and widgets. Customising this form has not been considered!\n\nURLs\n~~~~\n\nThe subscribe plugin comes with two namespaced URLs that are Django REST\nFramework endpoints:\n\n- subscribe: Used by the subscription form to sign up with just an\n email address. Visitors will be added as 'Unrecognized'. The email\n address used will receive an email asking the user to click a link to\n confirm their subscription.\n- confirm: The confirmation link contains a signature that\n authenticates the user. The form first recognizes the user as\n 'Guest'. The form then allows users to manage their subscriptions.\n\nPlease include these urls in your own urlconf, for example:\n\n.. code:: python\n\n api_urls = [\n url(r'^api/', include([\n url(r'^shop/', include('shop.urls', namespace='shop')),\n url(r'^shop_subscribe/', include('shop_subscribe.urls')), # for email subscriptions\n ]))\n ]\n urlpatterns += [url(r'', include(api_urls))]\n\nForms\n~~~~~\n\nTwo forms are provided, one for initial subscription, the other for\nconfirming and managing subscriptions without the need to log in. The\nlatter is useful for Guest users that are unable to log in.\n\nEither form can be integrated into existing CMS placeholders using the\nCMS plugin called *Subscriptions Form*, which can be found in the *Shop*\nplugin section. The template rendered for either form can be overridden\nby creating the following templates in your shop app:\n\n- /shop\\_subscribe/subscribe-form.html\n- /shop\\_subscribe/confirm-form.html\n\nThese templates will be rendered with ``form`` and ``action`` context\nvariables. Here is what the plugin should look like:\n\n.. figure:: https://github.com/racitup/djangoshop-subscribe/raw/master/doc/img/cms-plugin.png\n :alt: CMS Plugin\n\n CMS plugin image\n\nSubscription Form\n^^^^^^^^^^^^^^^^^\n\n.. figure:: https://github.com/racitup/djangoshop-subscribe/raw/master/doc/img/subscribe.png\n :alt: Subscription form\n\n Subscription form image\n\nIt is recommended that the subscription form is embedded into an\nexisting product page, for example the product detail page. This can be\nacheived using the CMS plugin as above. Alternatively you may include\nthe form directly into a template, for example:\n\n.. code:: html+django\n\n
\n ...\n {% include \"shop_subscribe/subscribe-form.html\" %}\n ...\n
\n\nAn included template tag ensures the relevant context variables are\navailable for rendering.\n\nConfirmation Form\n^^^^^^^^^^^^^^^^^\n\n.. figure:: https://github.com/racitup/djangoshop-subscribe/raw/master/doc/img/confirm.png\n :alt: Confirmation form\n\n Confirmation form image\n\nThe confirmation form can be on a CMS page as above, included in a\nstandard Django template, or as a last resort, a default form is\nincluded that will be rendered by Django REST Framework.\n\nConfirmation form email link URL resolution order:\n\n1. CMS page id (aka reverse\\_id): ``shop-subscribe-confirm``;\n2. Django URL name: ``shop-subscribe-confirm``;\n3. Default URL ``shop_subscribe:confirm`` which renders a default form.\n\n**Note:** The confirmation page must be live when the subscription form\nis live and the URL must not be changed. Otherwise the confirmation\nemail links sent out will not point to the correct URL.\n\nMinimal Checkout Customer Form\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nLook for the *Customer Form (minimal)* CMS plugin.\n*Note* that any fields added to the Customer Model must be configured to allow blank form entries\n(``blank=True`` and/or specify a default value) for correct operation.\n\nAdmin\n~~~~~\n\nTo add subscriptions management to the customer admin, you must create your own customer admin\nmodule derived from the shop base module, like so:\n\n.. code:: python\n\n from django.contrib import admin\n from shop.admin.customer import CustomerProxy, CustomerAdminBase\n from shop_subscribe.admin import SubscriptionsInlineAdmin\n\n\n # Because Customer is attached to the user model, use this proxy model:\n @admin.register(CustomerProxy)\n class CustomerAdmin(CustomerAdminBase):\n \"\"\"Customised customeradmin class\"\"\"\n inlines = (SubscriptionsInlineAdmin,)", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/racitup/djangoshop-subscribe", "keywords": "Django,Django-SHOP", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "djangoshop-subscribe", "package_url": "https://pypi.org/project/djangoshop-subscribe/", "platform": "OS Independent", "project_url": "https://pypi.org/project/djangoshop-subscribe/", "project_urls": { "Homepage": "https://github.com/racitup/djangoshop-subscribe" }, "release_url": "https://pypi.org/project/djangoshop-subscribe/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "An email subscription plugin for Django-SHOP", "version": "0.2.1" }, "last_serial": 3276404, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "cafe0dbbc9139f707cfb1480cde24e3d", "sha256": "32758507748f9bc302b5636214bcd45d6f01e0067ba4cde015baf82cccd27f0b" }, "downloads": -1, "filename": "djangoshop-subscribe-0.1.0.tar.gz", "has_sig": false, "md5_digest": "cafe0dbbc9139f707cfb1480cde24e3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41833, "upload_time": "2017-07-27T23:29:45", "url": "https://files.pythonhosted.org/packages/16/bf/4e07f2b4f373e4b7c7339a0c7bcb6ef90db1201f3e3a31d9b24f10941034/djangoshop-subscribe-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7ed4132e7b081e7b5f2d5af034cd50f8", "sha256": "fa6de2577b6bacef7c5076bb1d645fdd6f0f4c2a40e1972543ee3a1ec879aab7" }, "downloads": -1, "filename": "djangoshop-subscribe-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7ed4132e7b081e7b5f2d5af034cd50f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42718, "upload_time": "2017-08-08T16:02:57", "url": "https://files.pythonhosted.org/packages/61/35/68c315d19998887a8394c1c94fce9e1ab1e67965a4a6f4fac145de72ba5c/djangoshop-subscribe-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b3caae387ac848b3ffd20a85e7b0154a", "sha256": "56f4d8130c4804f32740cc04f9bac470612d6a12ead3314f58897c5f1df9bc87" }, "downloads": -1, "filename": "djangoshop-subscribe-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b3caae387ac848b3ffd20a85e7b0154a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42739, "upload_time": "2017-08-09T15:25:29", "url": "https://files.pythonhosted.org/packages/39/7c/1f5111af4ef82e1ea0dcb4129d9824b9df40b1e031b40e5d2fd164a1e9d0/djangoshop-subscribe-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e7d6709e259634443b6666a05b29d299", "sha256": "20614dfc3f2589d11c5c64d1e6a39d5974b3bf8f94cfd214acacd9485f442df5" }, "downloads": -1, "filename": "djangoshop-subscribe-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e7d6709e259634443b6666a05b29d299", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43508, "upload_time": "2017-10-04T04:47:30", "url": "https://files.pythonhosted.org/packages/78/cd/2d46e2a8c1ccd26f580ab6687a8ca07d45b2ed22f0ccc3a2014595e93174/djangoshop-subscribe-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e58921007dcf30d52dc8eb84303efec6", "sha256": "9a314c031a76b25dc61db6f405b4c2961a83241f6a1830e394276b0dff579ce8" }, "downloads": -1, "filename": "djangoshop-subscribe-0.2.1.tar.gz", "has_sig": false, "md5_digest": "e58921007dcf30d52dc8eb84303efec6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42900, "upload_time": "2017-10-24T23:05:20", "url": "https://files.pythonhosted.org/packages/61/c2/3ddc44b046d4facc1fdbf53ef46cd2ad0918794ea8e1db8aa18e7bdd1a2e/djangoshop-subscribe-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e58921007dcf30d52dc8eb84303efec6", "sha256": "9a314c031a76b25dc61db6f405b4c2961a83241f6a1830e394276b0dff579ce8" }, "downloads": -1, "filename": "djangoshop-subscribe-0.2.1.tar.gz", "has_sig": false, "md5_digest": "e58921007dcf30d52dc8eb84303efec6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42900, "upload_time": "2017-10-24T23:05:20", "url": "https://files.pythonhosted.org/packages/61/c2/3ddc44b046d4facc1fdbf53ef46cd2ad0918794ea8e1db8aa18e7bdd1a2e/djangoshop-subscribe-0.2.1.tar.gz" } ] }