{ "info": { "author": "Stefan Foulis", "author_email": "stefan@foulis.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP" ], "description": "aldryn-apphook-reload\n=====================\n\n.. image:: https://travis-ci.org/aldryn/aldryn-apphook-reload.svg?branch=develop\n :target: https://travis-ci.org/aldryn/aldryn-apphook-reload\n\n.. image:: https://img.shields.io/coveralls/aldryn/aldryn-apphook-reload.svg\n :target: https://coveralls.io/r/aldryn/aldryn-apphook-reload\n\nReload urls of django CMS Apphooks without a restart\n\n\n.. warning:: This is a Prototype.\n\n\nIntroduction\n------------\n\nDjango CMS allows `extending cms pages with Apphooks\n`_.\nApphooks are saved in the Database, which means urls depend on the database contents. For changes\nto Apphooks to be reflected in ``reverse()`` and ``{% url ... %}`` calls, a webserver restart\nis usually necessary.\n\naldryn-apphook-reload will automatically reload urls from Django CMS apphooks, without the need\nof a webserver restart. It listens to ``cms.signals.urls_need_reloading`` and causes a reload.\n\nThe signal is only available in the process where the change to the database was made. In order\nfor other processes to know when to reload (be it a gunicorn worker or a process on a other server)\na token is saved in the database. This implies a performance hit: 1 database query per request.\n\n\nInstallation\n------------\n\n* add ``aldryn_apphook_reload`` to ``INSTALLED_APPS``.\n\n* add ``aldryn_apphook_reload.middleware.ApphookReloadMiddleware`` to ``MIDDLEWARE``\n (place it as close to the top as possible)\n\n* run migrations: ``python manage.py migrate aldryn_apphook_reload``\n\nAdvanced\n--------\n\nIf the process that triggers ``cms.signals.urls_need_reloading`` is a simple ``runserver`` under\nload ( ~2 requests per second), the reload sometimes fails on the other processes. This might be\ndue to an unknown race condition, where the token in the database is refreshed already, but the\nnew apphooks are not in the database yet. The other processes would try to reload right away\nand would reload the old apphooks.\nTests with gunicorn in the default mode and in the gevent mode worked fine though.\n\nWhy not save the token in the cache backend for better performance? - Because altering the cache\nwould happen right away, before the database transaction is committed at the end of the request.\nThus other process would reload their urls prematurely.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aldryn/aldryn-apphook-reload/", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "aldryn-apphook-reload", "package_url": "https://pypi.org/project/aldryn-apphook-reload/", "platform": "OS Independent", "project_url": "https://pypi.org/project/aldryn-apphook-reload/", "project_urls": { "Homepage": "https://github.com/aldryn/aldryn-apphook-reload/" }, "release_url": "https://pypi.org/project/aldryn-apphook-reload/0.3.0/", "requires_dist": [ "Django (>=1.11)" ], "requires_python": "", "summary": "Reload urls of django CMS Apphooks without a restart", "version": "0.3.0" }, "last_serial": 4528551, "releases": { "0.1a1": [ { "comment_text": "", "digests": { "md5": "ffb5daa480be07e5f196e53a2f5c7791", "sha256": "2cc5ad6c8717ec2552994eff2b72e8d826887840dbed66fa86f7428137cbdeba" }, "downloads": -1, "filename": "aldryn-apphook-reload-0.1a1.tar.gz", "has_sig": false, "md5_digest": "ffb5daa480be07e5f196e53a2f5c7791", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5385, "upload_time": "2014-12-19T18:25:18", "url": "https://files.pythonhosted.org/packages/d7/3f/99f4954c547325053676d8f680719cc405ecc2fceecefc4886c1ff990350/aldryn-apphook-reload-0.1a1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b710329280a7849f9260c36b6a14a909", "sha256": "6eea6b74271cceac2e5347abf7c8e07a715bb6eca07b5cf704313fb17fd60d22" }, "downloads": -1, "filename": "aldryn-apphook-reload-0.2.tar.gz", "has_sig": false, "md5_digest": "b710329280a7849f9260c36b6a14a909", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5314, "upload_time": "2015-01-28T11:32:17", "url": "https://files.pythonhosted.org/packages/5a/36/778dae1e0fcd9637d640325bd2d86898955b533b1ef70acc999a6fb951bf/aldryn-apphook-reload-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "9b9758ffa94f34d93715801ba34b032a", "sha256": "e331ac3b68aa5942d164afe9b37ce0054be3c49ab5d9c1454c909c1e68965bfb" }, "downloads": -1, "filename": "aldryn-apphook-reload-0.2.1.tar.gz", "has_sig": false, "md5_digest": "9b9758ffa94f34d93715801ba34b032a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5331, "upload_time": "2015-06-30T13:42:33", "url": "https://files.pythonhosted.org/packages/7a/79/aceefb3712a43467f9516c470709980bd0c54546012900268048e7ab857a/aldryn-apphook-reload-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "ef4d85f28a1682776f5d100416af1978", "sha256": "4b9360a66207a6474d6d798aea44ea35b14a14fcedc7b61e527a8194c0033434" }, "downloads": -1, "filename": "aldryn-apphook-reload-0.2.2.tar.gz", "has_sig": false, "md5_digest": "ef4d85f28a1682776f5d100416af1978", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5352, "upload_time": "2015-07-27T14:55:08", "url": "https://files.pythonhosted.org/packages/f0/01/be2a66a088945c20605289f85bc1f27293d5c045b999b08fc2705111452f/aldryn-apphook-reload-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "1577fed0a8f63bc483324449e89db989", "sha256": "049e9650caf2c052c8f14d9f24d2cfc51a1f60b902a7790d51f4fea26e6219e9" }, "downloads": -1, "filename": "aldryn-apphook-reload-0.2.3.tar.gz", "has_sig": false, "md5_digest": "1577fed0a8f63bc483324449e89db989", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5644, "upload_time": "2015-11-17T09:46:50", "url": "https://files.pythonhosted.org/packages/8c/68/8e8cc8a1b99969188afd89a30ed2954d9ab943b08c744a596735d8aae40c/aldryn-apphook-reload-0.2.3.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f001b35de85fac69e01c1f2a624be571", "sha256": "fa57b6a93773d945127299c113dcc10592769e8b2c13d3b0d226b8fa9a3a9212" }, "downloads": -1, "filename": "aldryn-apphook-reload-0.3.0.tar.gz", "has_sig": false, "md5_digest": "f001b35de85fac69e01c1f2a624be571", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5902, "upload_time": "2018-11-26T08:00:38", "url": "https://files.pythonhosted.org/packages/70/1c/0eff6f962e4e4d354bb430565e68fde9398eea995bd9739225c45660312b/aldryn-apphook-reload-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f001b35de85fac69e01c1f2a624be571", "sha256": "fa57b6a93773d945127299c113dcc10592769e8b2c13d3b0d226b8fa9a3a9212" }, "downloads": -1, "filename": "aldryn-apphook-reload-0.3.0.tar.gz", "has_sig": false, "md5_digest": "f001b35de85fac69e01c1f2a624be571", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5902, "upload_time": "2018-11-26T08:00:38", "url": "https://files.pythonhosted.org/packages/70/1c/0eff6f962e4e4d354bb430565e68fde9398eea995bd9739225c45660312b/aldryn-apphook-reload-0.3.0.tar.gz" } ] }