{ "info": { "author": "Jerome Paradis", "author_email": "jparadis@paradivision.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "=====\r\nUsage\r\n=====\r\n\r\ndjango-dynasite was developed to:\r\n * manage multiple sites in a single Django app\r\n\r\nInstallation\r\n============\r\n\r\nAvailable on PyPi::\r\n\r\n pip install django-dynasite\r\n\r\nConfiguration\r\n=============\r\n\r\nAdd to your installed apps in your setting.py file::\r\n\r\n INSTALLED_APPS = (\r\n ...\r\n 'dynasite',\r\n )\r\n\r\nGet the Site from SITE_ID or host name\r\n=============\r\n\r\ndjango.contrib.sites.models.get_current_site Replacement\r\nInstead, use:\r\n from dynasite.models import get_current_site\r\n ...\r\n site = get_current_site(request)\r\n\r\nWill fetch the site from the SITE_ID setting if defined. Otherwise, will try to match the hostname to a domain defined in django.contrib.sites.models.Site. Caching is used.\r\n\r\nAdd site variables to context to use in your Web app templates\r\n=============\r\n\r\nSimply add this middleware to your settings:\r\n\r\n TEMPLATE_CONTEXT_PROCESSORS = (\r\n \t...\r\n 'dynasite.context_processors.dynasite_context_processor',\r\n ...\r\n )\r\n\r\nThen, in your template, you have access to the 'dynasite' variable:\r\n\r\n dynasite.site -> returns the current site\r\n dynasite.site_url -> returns the current site's complete url. Takes into account if in secure mode or not.\r\n\r\nReplace cache middleware to take into account varying host names\r\n=============\r\n\r\nBy default, Django uses the full path of pages when creating keys for caching. However, it doesn't take into account the full URI when building the keys. If page templates change by host name, change your caching middleware:\r\n\r\n MIDDLEWARE_CLASSES = (\r\n 'dynasite.middleware.UpdateCacheMiddleware',\r\n ...\r\n 'dynasite.middleware.FetchFromCacheMiddleware',\r\n ...\r\n\r\nLICENSE\r\n=======\r\n\r\nCopyright (c) 2013 Jerome Paradis and contributors\r\n\r\nPermission is hereby granted, free of charge, to any person\r\nobtaining a copy of this software and associated documentation\r\nfiles (the \"Software\"), to deal in the Software without\r\nrestriction, including without limitation the rights to use,\r\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the\r\nSoftware is furnished to do so, subject to the following\r\nconditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\r\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\r\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\r\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.", "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/JeromeParadis/django-dynasite", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "django-dynasite", "package_url": "https://pypi.org/project/django-dynasite/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-dynasite/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/JeromeParadis/django-dynasite" }, "release_url": "https://pypi.org/project/django-dynasite/0.1beta3/", "requires_dist": null, "requires_python": null, "summary": "Tools to dynamically manage multiple Django Web sites in a single app the way you need to.", "version": "0.1beta3" }, "last_serial": 864955, "releases": { "0.1beta3": [ { "comment_text": "", "digests": { "md5": "18fb60e15fd4aab7e33650697f45c162", "sha256": "94fa39999a5602a711a961c9e6498833b9c9b159100cef8074431ee74def3377" }, "downloads": -1, "filename": "django-dynasite-0.1beta3.tar.gz", "has_sig": false, "md5_digest": "18fb60e15fd4aab7e33650697f45c162", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6099, "upload_time": "2013-09-13T15:31:53", "url": "https://files.pythonhosted.org/packages/95/11/a1aa7b70a4da5c0cc2411749ca35cc7e957ea93cd22852d4d1b8836eba8d/django-dynasite-0.1beta3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "18fb60e15fd4aab7e33650697f45c162", "sha256": "94fa39999a5602a711a961c9e6498833b9c9b159100cef8074431ee74def3377" }, "downloads": -1, "filename": "django-dynasite-0.1beta3.tar.gz", "has_sig": false, "md5_digest": "18fb60e15fd4aab7e33650697f45c162", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6099, "upload_time": "2013-09-13T15:31:53", "url": "https://files.pythonhosted.org/packages/95/11/a1aa7b70a4da5c0cc2411749ca35cc7e957ea93cd22852d4d1b8836eba8d/django-dynasite-0.1beta3.tar.gz" } ] }