{
"info": {
"author": "James Addison",
"author_email": "code@scottisheyes.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 4 - Beta",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware"
],
"description": "Django-Multihost -- A simplified, flexible Django multi-host app\n================================================================\n\n\nOverview\n--------\n\nDjango-Multihost is a Django middleware that overrides Site ORM functionality and gets the current Site from the Host header. The code is loosely based on the work done by Bruce Kroeze here: `django-threaded-multihost `_.\n\n\nDescription\n-----------\n\nThe MultiHostMiddleware class contained in this app has 2 tasks:\n\n#. Upon middleware __init__(), it overrides SiteManager.get_current() with a multihost-aware version that reads the ``Host`` header from the request and attempts to find a matching Site (caches it if cache is enabled).\n#. Upon middleware process_request(), it sets the request into ``threadlocal`` storage and then uses the new SiteManager.get_current() functionality to retrieve the Site matching the ``Host`` header and sets it into the request instance. If a match is not found and MULTIHOST_AUTO_WWW is True (the default), it will attempt to modify the ``Host`` URL to add/remove ``www.`` and attempt the lookup again. If it still doesn't find a matching Site, it redirects to ``MULTIHOST_REDIRECT_URL``.\n\n\nRequirements\n------------\n\n- Python 2.6 (May work with 2.3+, but untested - please report)\n- Django 1.2.x (May work with 1.0+, but untested - please report)\n\n\nInstallation\n------------\n\n#. Copy or symlink the ``multihost`` package into your django project directory or install it by running one of the following commands:\n\n ``python setup.py install``\n\n or\n\n ``pip install django-multihost``\n \n or\n\n ``easy_install django-multihost``\n\n#. Add ``MULTIHOST_REDIRECT_URL`` to ``settings.py``\n\n#. Add ``multihost.middleware.MultiHostMiddleware`` to your ``MIDDLEWARE_CLASSES`` in at the end of the list. If you find it isn't working, move it up the list order as there may be a middleware conflict.\n\nNote: Django does strange things (like sending requests to the wrong urls handler) when it is used in conjunction with debug_toolbar. To fix this problem, multihost must always be the last entry in MIDDLEWARE_CLASSES.\n\nAdvanced Settings\n----------------------\n\nThere are 2 settings that developers can use to override default functionality:\n\n- ``MULTIHOST_REDIRECT_URL``: **required**; no default. The default middleware request processing will redirect to this URL in the case of Site lookup failure.\n- ``MULTIHOST_AUTO_WWW``: optional; defaults to True. If the Site can't be found that matches the incoming Host header exactly, this will automatically try removing/adding ``www.`` and searching again.\n\n\nNotes\n-----\n\nIt is important to note that the MultiHostMiddleware middleware does database lookups against the Django tables corresponding to the `Site` model - in particular, against the `domain` field. In the default Django implementation (version 1.2.1 as of writing), the `domain` field is not indexed or unique and this may result in slower performance over time.\n\nFor this reason, web site/application developers should weigh the benefits and consider manually adding an index for the `Site` model's `domain` field using standard database access tools.\n\n\nSource\n------\n\nThe latest source code can always be found here: `github.com/jaddison/django-multihost `_\n\n\nCredits\n-------\n\nDjango-Multihost is maintained by `James Addison `_.\n\n\nLicense\n-------\n\nDjango-Multihost is Copyright (c) 2010-2012, James Addison. It is free software, and may be redistributed under the terms specified in the LICENSE file. \n\n\nQuestions, Comments, Concerns:\n------------------------------\n\nFeel free to open an issue here: `github.com/jaddison/django-multihost/issues `_",
"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/jaddison/django-multihost",
"keywords": null,
"license": "BSD",
"maintainer": null,
"maintainer_email": null,
"name": "django-multihost",
"package_url": "https://pypi.org/project/django-multihost/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/django-multihost/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://github.com/jaddison/django-multihost"
},
"release_url": "https://pypi.org/project/django-multihost/0.3/",
"requires_dist": null,
"requires_python": null,
"summary": "Simple multihost handling for Django",
"version": "0.3"
},
"last_serial": 790132,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "ce75e6b65272dcb33d7a102370761765",
"sha256": "080bd792b1827bb0d886a35d6f8b1768ab58c3ab4510b804843a4473e1db3197"
},
"downloads": -1,
"filename": "django-multihost-0.1.win-amd64.exe",
"has_sig": false,
"md5_digest": "ce75e6b65272dcb33d7a102370761765",
"packagetype": "bdist_wininst",
"python_version": "any",
"requires_python": null,
"size": 233595,
"upload_time": "2010-08-28T17:35:01",
"url": "https://files.pythonhosted.org/packages/3f/0a/d6dd043c1232c93c51ac7a5660ac417f823272447d76d5892fecc3a5efdf/django-multihost-0.1.win-amd64.exe"
},
{
"comment_text": "",
"digests": {
"md5": "c88fe62ffcf54e06b92bb91a65977e57",
"sha256": "dada432cbf472b334c50fb43af2ef7d72f0cce95ade40516e093728de332c761"
},
"downloads": -1,
"filename": "django-multihost-0.1.zip",
"has_sig": false,
"md5_digest": "c88fe62ffcf54e06b92bb91a65977e57",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8118,
"upload_time": "2010-08-28T17:34:58",
"url": "https://files.pythonhosted.org/packages/3e/1e/c504daa7bba64bae9ed3731ba441471ec1aa26b8872d719dfee167847695/django-multihost-0.1.zip"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "6d5301908104752e67bcf043738e9ae6",
"sha256": "139e1520e3db7c5fa5bbbc24ae79a72a7d087a58d14565856caead4f95d09be1"
},
"downloads": -1,
"filename": "django-multihost-0.2.win-amd64.exe",
"has_sig": false,
"md5_digest": "6d5301908104752e67bcf043738e9ae6",
"packagetype": "bdist_wininst",
"python_version": "any",
"requires_python": null,
"size": 232909,
"upload_time": "2010-08-29T21:56:33",
"url": "https://files.pythonhosted.org/packages/01/86/7dcdd21ab6f5f9b5d83eef677f119d769771dccd7726920ec4a2ad1fa752/django-multihost-0.2.win-amd64.exe"
},
{
"comment_text": "",
"digests": {
"md5": "41277052576a61733e2e89f76cac5588",
"sha256": "6429b80a17c9c919236cdd2a0cefa08f49d1d0d0ba24ebd58d13fd761f8e04ca"
},
"downloads": -1,
"filename": "django-multihost-0.2.zip",
"has_sig": false,
"md5_digest": "41277052576a61733e2e89f76cac5588",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7798,
"upload_time": "2010-08-29T21:56:30",
"url": "https://files.pythonhosted.org/packages/fe/5f/ff2118a4e0e5c28b756f6e9c3bd1bf6c0fb456b50c0760ce179cfc435049/django-multihost-0.2.zip"
}
],
"0.2.1": [
{
"comment_text": "",
"digests": {
"md5": "65a7b4bde40ba981745839e31fa53082",
"sha256": "f667006593e80bfdc447a54416fd2bdf425421b78e9553d3e00896e32f8e5056"
},
"downloads": -1,
"filename": "django-multihost-0.2.1.win-amd64.exe",
"has_sig": false,
"md5_digest": "65a7b4bde40ba981745839e31fa53082",
"packagetype": "bdist_wininst",
"python_version": "any",
"requires_python": null,
"size": 233746,
"upload_time": "2010-08-30T17:26:21",
"url": "https://files.pythonhosted.org/packages/5e/7d/9a97faacf06be9a1f6b7264f64cda635b7b28d680d82f9c3555533e2d9d2/django-multihost-0.2.1.win-amd64.exe"
},
{
"comment_text": "",
"digests": {
"md5": "351ba414a7aacb5975d8a4961f4f5015",
"sha256": "9adc859141d6315023f3920738643a316da5e21cf0b9b98ce10f5d37c97e10a6"
},
"downloads": -1,
"filename": "django-multihost-0.2.1.zip",
"has_sig": false,
"md5_digest": "351ba414a7aacb5975d8a4961f4f5015",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8336,
"upload_time": "2010-08-30T17:26:17",
"url": "https://files.pythonhosted.org/packages/f4/b4/f072d9ad3b1cd15689a7bd0d3f5d0707fd827c6ae011c9c5f2f14bd0b05f/django-multihost-0.2.1.zip"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "76744e584c13415727c65229bc4e45ce",
"sha256": "118c7475fad47932dce846bd88220f9e1303e92b8e12b06d12ecc3e0a786c80f"
},
"downloads": -1,
"filename": "django-multihost-0.3.macosx-10.8-intel.exe",
"has_sig": false,
"md5_digest": "76744e584c13415727c65229bc4e45ce",
"packagetype": "bdist_wininst",
"python_version": "any",
"requires_python": null,
"size": 71763,
"upload_time": "2012-12-07T14:36:51",
"url": "https://files.pythonhosted.org/packages/93/28/28360190a4e6c907e7d609c257f9bb72786d30696b82c2462afd32fd483a/django-multihost-0.3.macosx-10.8-intel.exe"
},
{
"comment_text": "",
"digests": {
"md5": "6e077b6cfff000355c9b4ef5acea345a",
"sha256": "9ba68c7c81ffb85f9d6fa6901bf109c24f85badab9afeb9d0ba8aa2d74490a34"
},
"downloads": -1,
"filename": "django-multihost-0.3.tar.gz",
"has_sig": false,
"md5_digest": "6e077b6cfff000355c9b4ef5acea345a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5502,
"upload_time": "2012-12-07T14:36:50",
"url": "https://files.pythonhosted.org/packages/66/4c/6fe457df749afb6637ffd80e3d8fb0ff5e5e7491775e7c937e2f75b9799c/django-multihost-0.3.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "76744e584c13415727c65229bc4e45ce",
"sha256": "118c7475fad47932dce846bd88220f9e1303e92b8e12b06d12ecc3e0a786c80f"
},
"downloads": -1,
"filename": "django-multihost-0.3.macosx-10.8-intel.exe",
"has_sig": false,
"md5_digest": "76744e584c13415727c65229bc4e45ce",
"packagetype": "bdist_wininst",
"python_version": "any",
"requires_python": null,
"size": 71763,
"upload_time": "2012-12-07T14:36:51",
"url": "https://files.pythonhosted.org/packages/93/28/28360190a4e6c907e7d609c257f9bb72786d30696b82c2462afd32fd483a/django-multihost-0.3.macosx-10.8-intel.exe"
},
{
"comment_text": "",
"digests": {
"md5": "6e077b6cfff000355c9b4ef5acea345a",
"sha256": "9ba68c7c81ffb85f9d6fa6901bf109c24f85badab9afeb9d0ba8aa2d74490a34"
},
"downloads": -1,
"filename": "django-multihost-0.3.tar.gz",
"has_sig": false,
"md5_digest": "6e077b6cfff000355c9b4ef5acea345a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5502,
"upload_time": "2012-12-07T14:36:50",
"url": "https://files.pythonhosted.org/packages/66/4c/6fe457df749afb6637ffd80e3d8fb0ff5e5e7491775e7c937e2f75b9799c/django-multihost-0.3.tar.gz"
}
]
}