{ "info": { "author": "Pivotal Energy Solutions", "author_email": "sklass@pivotalenergysolutions.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Django Agile Sites (django_agilesites)\n\nThis provides django the ability of dynamic switching of the settings.SIDE_ID. This allows\nyou to then alter the template paths based on the SITE_ID by referencing settings.SITE_FOLDERS.\n\nThe way this works is first by dynamically setting (thread-safe) the settings.SITE_ID based on\nthe request.get_host() (which is based in part on request.META['HTTP_HOST']). Once the SITE_ID\nis established, then it uses that to dynamically look up any template path folder structure you \ndefine.\n\n\n## Example / Setup\n\nLets assume we want to have all traffic going to //beta.foo.com to use our new templates tree\ncalled 'beta' for a new template `app_detail.html`. This app will allows you to place the\nfollowing templates folder structure in your app to achieve this:\n\n app/\n templates/\n app/\n app_detail.html\n app_list.html\n beta/\n app_detail.html\n\n\nWe need to reference the two sites in question - so in the sites app assume the following.\n SITE_ID: 1 domain: foo.com\n SITE_ID: 2 domain: beta.foo.com\n\nNow to enable this to work you need to do the following:\n\n1. Add the `django_agilesites` to the settings.INSTALLED_APPS\n2. Add the `django_agilesites.loaders.AgileSiteAppDirectoriesFinder`\nto the settings.TEMPLATE_LOADERS. I put it _first_.\n3. Add the `django_agilesites.middleware.AgileSitesMiddleware'` to the\nsettings.MIDDLEWARE_CLASSES\n4. Add the following settings to reference the folder beta.\n\n\n SITE_FOLDERS = {\n 2: 'beta',\n }\n\n\nThat's it.\n\nNow when you go to //beta.foo.com/app/detail you will use the template in the beta tree and when\nyou go to the list view on beta it will refer to the parent app_list.html.\n\n\n## Notes:\n\n\n1. You do NOT need to reference the SITE_ID 1 as there isn't a path change for that.\n2. You don't have to put every url. We also support the notion of aliases through the use of\nsettings.SITE_ALIASES dictionary. This will force //beta.bar.com to also use the beta templates.\n\n\n SITE_ALIASES = {\n 'beta.bar.com': 2,\n }\n\n## Versions\n- 1.0.x Django 1.8\n- 1.1.x Django 1.9 < 2\n\n### Build Process:\n1. Update the `__version_info__` inside of the application. Commit and push.\n2. Tag the release with the version. `git tag -m \"Release\"; git push --tags`\n3. Build the release `rm -rf dist build *egg-info; python setup.py sdist bdist_wheel`\n4. Upload the data `twine upload dist/*`\n\nHave fun!\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/pivotal-energy-solutions/django-agilesites/archive/1.1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pivotal-energy-solutions/django-agilesites", "keywords": "django sites", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-agilesites", "package_url": "https://pypi.org/project/django-agilesites/", "platform": "", "project_url": "https://pypi.org/project/django-agilesites/", "project_urls": { "Bug Reports": "https://github.com/pivotal-energy-solutions/django-agilesites/issues", "Download": "https://github.com/pivotal-energy-solutions/django-agilesites/archive/1.1.0.tar.gz", "Homepage": "https://github.com/pivotal-energy-solutions/django-agilesites", "Say Thanks!": "http://saythanks.io/to/rh0dium", "Source": "https://github.com/pivotal-energy-solutions/django-agilesites" }, "release_url": "https://pypi.org/project/django-agilesites/1.1.0/", "requires_dist": [ "django (<2,>=1.9)" ], "requires_python": "", "summary": "Dynamic switching of the settings.SIDE_ID for a Django Project", "version": "1.1.0" }, "last_serial": 3811122, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "88321001b7fa3fd83c39efc7538bb70e", "sha256": "b196e41c9e31b91feb0f34917ba2150be1ca580e0ddfafc9f24cfa3f73afb5db" }, "downloads": -1, "filename": "django_agilesites-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "88321001b7fa3fd83c39efc7538bb70e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9957, "upload_time": "2018-04-22T21:31:10", "url": "https://files.pythonhosted.org/packages/90/76/936c038d9e316be916cd6737fc14c3ad809ffb3d87e8368c6a686a40f305/django_agilesites-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3aad14b0fcf6fa5b7dc796365de132cc", "sha256": "4b508745d835398b67d9c6e65571a47bbaac15f988192d20223dab7dda554d1a" }, "downloads": -1, "filename": "django_agilesites-1.0.1.tar.gz", "has_sig": false, "md5_digest": "3aad14b0fcf6fa5b7dc796365de132cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11021, "upload_time": "2018-04-22T21:31:11", "url": "https://files.pythonhosted.org/packages/86/88/7f5c0d894d7dcf503dff066e5256fc4159559cb725cd83102a46895ff140/django_agilesites-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "54be18c9bd4edd355e08612fadb3765b", "sha256": "7dfbc57c8b0f1ce630c3a07d2eca110e1bdeb4534d57aa883332d975fd3bf3ef" }, "downloads": -1, "filename": "django_agilesites-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "54be18c9bd4edd355e08612fadb3765b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9950, "upload_time": "2018-04-23T01:31:30", "url": "https://files.pythonhosted.org/packages/68/41/f319deacf586d8246a6b7c39ae498ad97e9975d6a2530c2b79a67dba7bc3/django_agilesites-1.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "722ec65a313f3cfa8a8aa2b105ecae77", "sha256": "23355c53b24d856d2c9da023503e0e9aebe1c834e1e57fd86b558eac988a3b2c" }, "downloads": -1, "filename": "django_agilesites-1.0.2.tar.gz", "has_sig": false, "md5_digest": "722ec65a313f3cfa8a8aa2b105ecae77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10993, "upload_time": "2018-04-23T01:31:31", "url": "https://files.pythonhosted.org/packages/03/5e/3138e92a868e7427e8f79b651adb9835ac87aa8f12754860b39886911bd8/django_agilesites-1.0.2.tar.gz" } ], "1.0.2rc2": [ { "comment_text": "", "digests": { "md5": "9388ec6cf6cf6a76898ee46107687382", "sha256": "31f9695a854c42826d221a9928b695a1db5decbf988f75bb285ed7e115b1faba" }, "downloads": -1, "filename": "django_agilesites-1.0.2rc2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9388ec6cf6cf6a76898ee46107687382", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9994, "upload_time": "2018-04-23T01:28:27", "url": "https://files.pythonhosted.org/packages/49/43/2a7c2060a31b6f5d0e843e78e7a6538e07ae10d9b8bac6f19d9182bf325e/django_agilesites-1.0.2rc2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2e6e2365df929d2ac77c490790da79d", "sha256": "013cfd4fca566b5e29886691fea6e9ad072542c045eed1e36a68e0d2d9ee7152" }, "downloads": -1, "filename": "django_agilesites-1.0.2rc2.tar.gz", "has_sig": false, "md5_digest": "e2e6e2365df929d2ac77c490790da79d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11000, "upload_time": "2018-04-23T01:28:28", "url": "https://files.pythonhosted.org/packages/dd/76/61821d5e5819ee59b8a00a28d14aeea9358429aeb5065c9b3c8a522bcf5d/django_agilesites-1.0.2rc2.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "b975f4eefb2f487c92434e0f60ebfb43", "sha256": "9b51fc4d6f9b1db4b077f8a4dee4ea0c7c6c24c82c259fa619edabdb4ff003c2" }, "downloads": -1, "filename": "django_agilesites-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b975f4eefb2f487c92434e0f60ebfb43", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10008, "upload_time": "2018-04-26T16:52:39", "url": "https://files.pythonhosted.org/packages/f7/e1/7a1326e15fd62bcdceff0ba8cfff1736440723b5ca77cc00d6acc1313633/django_agilesites-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a171b715821167932e19a2210be92e90", "sha256": "1ea5c3cc0a5263ad29d0eab2f0c30f7a01bb72bd359831781cb6db20b8f3f2cf" }, "downloads": -1, "filename": "django_agilesites-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a171b715821167932e19a2210be92e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11067, "upload_time": "2018-04-26T16:52:41", "url": "https://files.pythonhosted.org/packages/15/65/28b59f1796b94543a88dcf7b7cc3bb94c0234bdc873267932f85a007d259/django_agilesites-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b975f4eefb2f487c92434e0f60ebfb43", "sha256": "9b51fc4d6f9b1db4b077f8a4dee4ea0c7c6c24c82c259fa619edabdb4ff003c2" }, "downloads": -1, "filename": "django_agilesites-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b975f4eefb2f487c92434e0f60ebfb43", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10008, "upload_time": "2018-04-26T16:52:39", "url": "https://files.pythonhosted.org/packages/f7/e1/7a1326e15fd62bcdceff0ba8cfff1736440723b5ca77cc00d6acc1313633/django_agilesites-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a171b715821167932e19a2210be92e90", "sha256": "1ea5c3cc0a5263ad29d0eab2f0c30f7a01bb72bd359831781cb6db20b8f3f2cf" }, "downloads": -1, "filename": "django_agilesites-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a171b715821167932e19a2210be92e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11067, "upload_time": "2018-04-26T16:52:41", "url": "https://files.pythonhosted.org/packages/15/65/28b59f1796b94543a88dcf7b7cc3bb94c0234bdc873267932f85a007d259/django_agilesites-1.1.0.tar.gz" } ] }