{ "info": { "author": "Andriy Gushuley", "author_email": "agushuley@me.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "gu-django-multihost\n===\n\n**gu-django-multihost** is a Django application/framework which allow to serve different hostnames \"\n \"and urlconfs in one django application instance\nQuickstart:\n===\n\nInstall gu-django-multihost:\n\n $ pip install gu-django-multihost\n\nAdd gu-multihost to INSTALLED_APPS in settings.py for your project:\n\n INSTALLED_APPS = (\n ...\n 'gu_multihost',\n )\n\n #multihost\n MULTIHOST_DATABASE_DRIVEN_URLS = True # means that list or url modules are stored in database and managed there\n\n #for MULTIHOST_DATABASE_DRIVEN_URLS = False make a list possilbe selections for sites urls\n from gu_multihost import MULTIHOST_DEFAULT_URLS\n MULTIHOST_AVAILABLE_URLS = MULTIHOST_DEFAULT_URLS + [ROOT_URLCONF, ]\n\nAdd middleware class fetch from cache middleware :\n\n MIDDLEWARE_CLASSES += (\n # should be called after FetchFromCacheMiddleware\n 'gu_multihost.middleware.MultiHostMiddleware',\n 'django.middleware.cache.FetchFromCacheMiddleware',\n )\n\nSetup you'r multihost sites objects.\n\nStandard core django sites host names should be configured to actual accesible domain names with protocol name and port values without ending slash:\n\n https://site-name.org:8433\n\nIn your code:\n\n import gu_multihost\n\nYu can query current site, which serves a request:\n\n gu_multihost.get_current_site.site # link to django site object\n\nYou can build urls for different sites with a full url.\n\n gu_multihost.mh_reverse(news_item, site=None, full_url=False, [site.two_letter_code, nid])\n\nBuild short url for default site - /BB/news/item/XXX/\n\n gu_multihost.mh_reverse(news_item, site=None, full_url=False, [site.two_letter_code, nid])\n\nBuild full url for default site - http://default.site/BB/news/item/XXX/\n\n gu_multihost.mh_reverse(news_item, site=mobile, full_url=False, [site.two_letter_code, nid])\n\nBuild full url for separate site - http://mobile.site/BB/ni/XXX/\n\nThe same is from django templates:\n\n {% import multihost %}\n\n {% mh_reverse 'portal-news-item' '' 'pb' %}\n {% mh_reverse 'portal-news-item' 'mobile' 'pb' %}\n\nLicense (and related information):\n===\nOriginally written by Andriy Gushuley.\n\nThis program is licensed under the MIT License (see LICENSE.txt)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/agushuley/django-multihost", "keywords": "django multihost framework", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "gu-django-multihost", "package_url": "https://pypi.org/project/gu-django-multihost/", "platform": "any", "project_url": "https://pypi.org/project/gu-django-multihost/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/agushuley/django-multihost" }, "release_url": "https://pypi.org/project/gu-django-multihost/1.2.0/", "requires_dist": null, "requires_python": null, "summary": "A Django application/framework which allow to serve different hostnames and urlconfs in one django application instance", "version": "1.2.0" }, "last_serial": 970769, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "3751324fa482947a89a8d8d4af0406a3", "sha256": "560bed8968987ac18c3c38f4738f6a4971b60f7c65a13f0c0013f0d3d6227ec4" }, "downloads": -1, "filename": "gu-django-multihost-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3751324fa482947a89a8d8d4af0406a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4073, "upload_time": "2013-11-03T12:17:32", "url": "https://files.pythonhosted.org/packages/32/92/f182487c995fb3d0c7d562628a060641b51f986a9e586611f48fc2a82911/gu-django-multihost-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "6593a09720e5ea0e863131166887ff01", "sha256": "204ba8e348fb6f3d305f39374ca9099b486a85ef0a57b1a1551c757146083b3c" }, "downloads": -1, "filename": "gu-django-multihost-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6593a09720e5ea0e863131166887ff01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4412, "upload_time": "2013-11-04T09:18:40", "url": "https://files.pythonhosted.org/packages/0f/1b/6b37d03811190448ab810b743b0afec690387f93efb6af88d1d1d1786bf6/gu-django-multihost-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "4b1f42a39fc351142c98d93e4cc3dc41", "sha256": "b7ed0d9f8d8528c825fb044cf282e5a26aaa57e3eef730a692ae0739d4a4c2ea" }, "downloads": -1, "filename": "gu-django-multihost-1.0.2.tar.gz", "has_sig": false, "md5_digest": "4b1f42a39fc351142c98d93e4cc3dc41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4410, "upload_time": "2013-11-04T09:21:53", "url": "https://files.pythonhosted.org/packages/54/79/a5af455d9b3a4641a7c6dbb893b87690fec20d4e7da8d1a828f708e5b579/gu-django-multihost-1.0.2.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "b47ddf159837f4a0879306fe89b9449d", "sha256": "582e7d5d158d1cb0ac62d23641858648ab6b6b71d40b50f4bd29b92b0b2cad2a" }, "downloads": -1, "filename": "gu-django-multihost-1.2.0.tar.gz", "has_sig": false, "md5_digest": "b47ddf159837f4a0879306fe89b9449d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5662, "upload_time": "2014-01-16T11:37:34", "url": "https://files.pythonhosted.org/packages/76/e1/a74c2954b4f563d081e30ae25c66d626a6caa09d80289e8808e1cc36c47d/gu-django-multihost-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b47ddf159837f4a0879306fe89b9449d", "sha256": "582e7d5d158d1cb0ac62d23641858648ab6b6b71d40b50f4bd29b92b0b2cad2a" }, "downloads": -1, "filename": "gu-django-multihost-1.2.0.tar.gz", "has_sig": false, "md5_digest": "b47ddf159837f4a0879306fe89b9449d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5662, "upload_time": "2014-01-16T11:37:34", "url": "https://files.pythonhosted.org/packages/76/e1/a74c2954b4f563d081e30ae25c66d626a6caa09d80289e8808e1cc36c47d/gu-django-multihost-1.2.0.tar.gz" } ] }