{ "info": { "author": "mySociety", "author_email": "matthew@mysociety.org", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "Instances\n=========\n\nA simple way of allowing subdomains to be served by the same project, and\nassociating objects with particular subdomains.\n\nInstallation\n------------\n\n1. By default, it will work if you use 127.0.0.1.nip.io (a domain that points\n to localhost) on port 80. To use a different base domain/port, set the\n `BASE_HOST` and/or `BASE_PORT` variables.\n\n2. Add `instances` to your `INSTALLED_APPS` and migrate to get the Instance\n database table.\n\n3. Add Instance objects, with the label being the subdomain you wish to use.\n Optionally, associate users with these instances.\n\n4. Add `instances.middleware.MultiInstanceMiddleware` to your middleware; it\n must come after AuthenticationMiddleware. Now\n if you go to `.`, request.instance will be set to the\n matching Instance object. If there's a subdomain given but no match, it will\n redirect to `BASE_HOST`.\n\nRequests to a subdomain will use your `ROOT_URLCONF` file; requests to the\n`BASE_HOST` will use `ROOT_URLCONF_HOST` or `instances.urls` by default (which\njust has one page that lists all instances)..\n\nInstance edit form\n------------------\n\nIn your ROOT_URLCONF, use a line like the following to have a page for editing\nthe title and description of an instance:\n\n`url(r'^instance/edit$', InstanceUpdate.as_view(), name='instance-edit')`\n\nAssociating models\n------------------\n\nTo have a model's objects be associated with an instance, mix in InstanceMixin,\nand if you have a custom manager make it a subclass of InstanceManager. This\nadds an `instance` field, and provides a `for_instance` manager method to\nreturn all the objects in the given instance.\n\nMix in InstanceViewMixin to any display class-based view to restrict the\ndefault queryset to the request's instance. Add InstanceFormMixin to any\ncreate/update view to store the current instance upon save, and allow editing\nonly by those users associated with the instance. Remember to exclude\n`instance` from any model form, as it won't be seen.\n\nRunning tests\n-------------\n\n.. code-block::\n\n pip install .\n python runtests.py\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/mysociety/django-subdomain-instances", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-subdomain-instances", "package_url": "https://pypi.org/project/django-subdomain-instances/", "platform": "", "project_url": "https://pypi.org/project/django-subdomain-instances/", "project_urls": { "Homepage": "https://github.com/mysociety/django-subdomain-instances" }, "release_url": "https://pypi.org/project/django-subdomain-instances/3.0.2/", "requires_dist": [ "Django (>=1.11)" ], "requires_python": "", "summary": "A way of allowing subdomains to be served by the same project, and associating objects with particular subdomains.", "version": "3.0.2" }, "last_serial": 5519201, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5ad072fd57cc5abf280724450c557534", "sha256": "bc5d5e93429f953b61597d562d290b6bdf6c719ba25d413b435b1196a158a4cb" }, "downloads": -1, "filename": "django-subdomain-instances-0.1.tar.gz", "has_sig": false, "md5_digest": "5ad072fd57cc5abf280724450c557534", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8033, "upload_time": "2013-08-07T22:02:22", "url": "https://files.pythonhosted.org/packages/32/8a/8721e35c16c931d8c41f8c1fecdea08e644df5459feb6e9d9f7c499f7cc9/django-subdomain-instances-0.1.tar.gz" } ], "0.10": [ { "comment_text": "", "digests": { "md5": "7313498cd47d9df2e947fc72be9d0294", "sha256": "b37a371bc7916c1b8052cd78a8dd3e693f102f6405147052ebff62cd967b4e82" }, "downloads": -1, "filename": "django-subdomain-instances-0.10.tar.gz", "has_sig": false, "md5_digest": "7313498cd47d9df2e947fc72be9d0294", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9933, "upload_time": "2014-11-12T14:49:23", "url": "https://files.pythonhosted.org/packages/97/f0/6ea671175030cd87ca53116a76bec42c878883a1020f9a8ea316542ab373/django-subdomain-instances-0.10.tar.gz" } ], "0.10.2": [ { "comment_text": "", "digests": { "md5": "9bc3f0792adae08538b41b4d7e7d0f80", "sha256": "476307557387e6a319cb30357e051335f25a4f4b0940a582a64fcb20c9afe4aa" }, "downloads": -1, "filename": "django-subdomain-instances-0.10.2.tar.gz", "has_sig": false, "md5_digest": "9bc3f0792adae08538b41b4d7e7d0f80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10925, "upload_time": "2014-11-20T15:35:13", "url": "https://files.pythonhosted.org/packages/d0/e3/e06eef1bd4ee29ff144a86c2100b06695b86714648fb75cfa1995f9ae4a1/django-subdomain-instances-0.10.2.tar.gz" } ], "0.10.3": [ { "comment_text": "", "digests": { "md5": "b94d457403a2059c2f382ac754811685", "sha256": "157acbe35fc824e643e662033fc93da9bb9babc78368e6a7a4256eda4d3be89b" }, "downloads": -1, "filename": "django_subdomain_instances-0.10.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b94d457403a2059c2f382ac754811685", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19712, "upload_time": "2015-10-01T12:26:41", "url": "https://files.pythonhosted.org/packages/34/0b/ff090fd9ce314a297eb8b950ee7c1437a8c13d0826a05c5820a569ccb276/django_subdomain_instances-0.10.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a51fb08b074531af80fa77002384611", "sha256": "699682720ee2341887914f938afb8ada50149198f733feac987d9a615440d96f" }, "downloads": -1, "filename": "django-subdomain-instances-0.10.3.tar.gz", "has_sig": false, "md5_digest": "3a51fb08b074531af80fa77002384611", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11176, "upload_time": "2015-10-01T12:26:37", "url": "https://files.pythonhosted.org/packages/4b/f7/a4e2ec7fa1d328798f581056dd88f2457e97bcced2c3a214856bfd2178e6/django-subdomain-instances-0.10.3.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "b076986dc88c02c545cd4fb3b31349db", "sha256": "e855598e609798ec4d7d9f4b14204474638baee8aca110e2546f01176c69e39c" }, "downloads": -1, "filename": "django-subdomain-instances-0.2.tar.gz", "has_sig": false, "md5_digest": "b076986dc88c02c545cd4fb3b31349db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8034, "upload_time": "2014-05-01T12:39:13", "url": "https://files.pythonhosted.org/packages/26/c5/5276b8ea381bd0226f4c6b522e705e1ae2be1660c5818e1d89f516006beb/django-subdomain-instances-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b001ade9369f4526ae42c5280632d7f2", "sha256": "b53ee010f3066b0808fd49dd3c663a8640ed9ac9342fc8b8e82fc3e0a4b4d456" }, "downloads": -1, "filename": "django-subdomain-instances-0.3.tar.gz", "has_sig": false, "md5_digest": "b001ade9369f4526ae42c5280632d7f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8209, "upload_time": "2014-06-20T09:01:05", "url": "https://files.pythonhosted.org/packages/af/bc/20d83ef1a5e0e66019518248e45147dedb32befc38caf0c6926bb4d83ab1/django-subdomain-instances-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "f3319e1b112d432dffe6a37084ceccee", "sha256": "9b4d872bd95fb08852ac8167bdbfcbecd04f8b8b94667cb903624220f58fb222" }, "downloads": -1, "filename": "django-subdomain-instances-0.4.tar.gz", "has_sig": false, "md5_digest": "f3319e1b112d432dffe6a37084ceccee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8273, "upload_time": "2014-06-26T10:50:11", "url": "https://files.pythonhosted.org/packages/34/8c/2fc448bf6f5d40b57ee504be837fe998c7d6b648cc0ba87c9568abaf8972/django-subdomain-instances-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "d3efd3b1cba592de517e4c6b0789b0c1", "sha256": "4be9a37f69c4c4c586837fbb23ad653f86940de0a4de9bbedffccb893257808b" }, "downloads": -1, "filename": "django-subdomain-instances-0.5.tar.gz", "has_sig": false, "md5_digest": "d3efd3b1cba592de517e4c6b0789b0c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8279, "upload_time": "2014-07-04T20:27:02", "url": "https://files.pythonhosted.org/packages/79/6c/e8f1c0c6c873432df22fb965b4a5d9aeaadf9468fc02ed85e43f1364261d/django-subdomain-instances-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "28bc95c2e911394bcade85b253450b91", "sha256": "e28cfefe702861c95206fa50cecea047b44e84d5d3294d30aa62fce8ef03e57c" }, "downloads": -1, "filename": "django-subdomain-instances-0.6.tar.gz", "has_sig": false, "md5_digest": "28bc95c2e911394bcade85b253450b91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6388, "upload_time": "2014-09-25T23:40:51", "url": "https://files.pythonhosted.org/packages/7a/69/aab19368a1983fd87f31392257f3889214f0a7714f15396110bb258d41a9/django-subdomain-instances-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "27eed0ccbca842e66b8d3cbacaf8470d", "sha256": "af78e90d2ba9d8d15310c8e63519e1eb0db984a0d53287129df53874610c4145" }, "downloads": -1, "filename": "django-subdomain-instances-0.7.tar.gz", "has_sig": false, "md5_digest": "27eed0ccbca842e66b8d3cbacaf8470d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8826, "upload_time": "2014-09-29T10:08:11", "url": "https://files.pythonhosted.org/packages/ee/48/331192d88f758d830327fe35aa45ed82266777ed2bbb6f4dc2ea6e21c76a/django-subdomain-instances-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "9b159c631928f029b5d6697b7ddc76de", "sha256": "f723cd5e5dfe219e75e05d4ece516b6f8fb9f8864f4beb2c7fd7d363187e85bf" }, "downloads": -1, "filename": "django-subdomain-instances-0.8.tar.gz", "has_sig": false, "md5_digest": "9b159c631928f029b5d6697b7ddc76de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8904, "upload_time": "2014-10-03T16:41:10", "url": "https://files.pythonhosted.org/packages/76/b4/1addab027dc6411500136d297d4955402a1f9af6111319da81760ca77ed1/django-subdomain-instances-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "d4ae61dc1165f590fe798af06a138153", "sha256": "46e76596c88c4d9b7923402fe5966ba289494a99042e63ed3472d6bef1a8492c" }, "downloads": -1, "filename": "django-subdomain-instances-0.9.tar.gz", "has_sig": false, "md5_digest": "d4ae61dc1165f590fe798af06a138153", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9147, "upload_time": "2014-10-08T15:35:00", "url": "https://files.pythonhosted.org/packages/ea/67/e72b2b3a426dd27845795c61002cacc25258836b6f29c4a46d3b4b1ff798/django-subdomain-instances-0.9.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "2abb40fd6536e2ce4df32faeae865efe", "sha256": "f184ca045f658cee6736f52ae97b51d1c05e917a71b9a6d5413775bffdca2214" }, "downloads": -1, "filename": "django_subdomain_instances-1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2abb40fd6536e2ce4df32faeae865efe", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19209, "upload_time": "2015-11-13T16:25:48", "url": "https://files.pythonhosted.org/packages/a9/50/9fe40cd3030db44ddd67c74e874fc4209d8061dfd740a85b06d377844947/django_subdomain_instances-1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "31215c67ed21d2ebd5ed2e0f53eac38f", "sha256": "cce8513df5a6117ac68e7eea47d01f25a78855518fe6263da6278421d034eebb" }, "downloads": -1, "filename": "django-subdomain-instances-1.0.tar.gz", "has_sig": false, "md5_digest": "31215c67ed21d2ebd5ed2e0f53eac38f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9359, "upload_time": "2015-11-13T16:25:43", "url": "https://files.pythonhosted.org/packages/11/1f/0f3e46c78997d3d2c266de8f33763bdf91553e40445fad25c290599803be/django-subdomain-instances-1.0.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "7d906e255abe8ba660c49b8b0883815e", "sha256": "d72b0f3fea6c92a6ee5e2af24add64cd1173d429435e617a35291407c6b8c84d" }, "downloads": -1, "filename": "django_subdomain_instances-2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7d906e255abe8ba660c49b8b0883815e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19312, "upload_time": "2017-06-15T20:16:40", "url": "https://files.pythonhosted.org/packages/b3/7c/98032ebe31cfb956ea89c5a6aa44cf9e844716fbe9a23b7fe611367d45f1/django_subdomain_instances-2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0612b66eb39420c4cc78c855aaefc9ae", "sha256": "8599504cd3b7c8682e7673d71629a1712446550150dd060df6fd785dcea88237" }, "downloads": -1, "filename": "django-subdomain-instances-2.0.tar.gz", "has_sig": false, "md5_digest": "0612b66eb39420c4cc78c855aaefc9ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9468, "upload_time": "2017-06-15T20:16:34", "url": "https://files.pythonhosted.org/packages/fa/7e/f926c63c3266934f21a71569c44b1f0bc1d8047849779786545ffa0e81d7/django-subdomain-instances-2.0.tar.gz" } ], "3.0": [ { "comment_text": "", "digests": { "md5": "729fcf14a219b8e85f6831d6bab742e9", "sha256": "efe9589b0cd6e4227470e06ebfa716e669ba0bce2e31b658d610a3434d5f6a06" }, "downloads": -1, "filename": "django_subdomain_instances-3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "729fcf14a219b8e85f6831d6bab742e9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15047, "upload_time": "2019-04-09T15:57:02", "url": "https://files.pythonhosted.org/packages/a2/79/da6759db8cb4e59322e45d5c7eb247e2d24684c8876fa169ef251585c228/django_subdomain_instances-3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d97e97e2fb7f9d3132c8df184452936d", "sha256": "5dcabb7728fab9626a5231a27db6ad1a13d0a6f1b8c79557e54ef99fca77116f" }, "downloads": -1, "filename": "django-subdomain-instances-3.0.tar.gz", "has_sig": false, "md5_digest": "d97e97e2fb7f9d3132c8df184452936d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9161, "upload_time": "2019-04-09T15:57:05", "url": "https://files.pythonhosted.org/packages/9b/27/018556edcff549649e1385c4698b6fafb4e7f6257b785656f71a683e513f/django-subdomain-instances-3.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "e2a27d073bfe26875d2939976dc5dab7", "sha256": "5a6d0d9d634aca9faad74121b9c9659f32ec1ff2c80c9a08cfa761ce4e49d805" }, "downloads": -1, "filename": "django_subdomain_instances-3.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e2a27d073bfe26875d2939976dc5dab7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15021, "upload_time": "2019-04-09T17:03:44", "url": "https://files.pythonhosted.org/packages/a3/79/171f8d057d5ba62a40414f665d917d5e98ed97436f9396b8ce28aeb25be3/django_subdomain_instances-3.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85fe5ce1e225b5a714c87786c78fc69a", "sha256": "0f5962a4b217d76a82b5b74926331c740850aa04811eb49362beb517947054aa" }, "downloads": -1, "filename": "django-subdomain-instances-3.0.1.tar.gz", "has_sig": false, "md5_digest": "85fe5ce1e225b5a714c87786c78fc69a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9147, "upload_time": "2019-04-09T17:03:46", "url": "https://files.pythonhosted.org/packages/3f/5b/5359cb55c0655b7d6d0b8d5933a3fa30c27ac71a6d363656570e35e9ae74/django-subdomain-instances-3.0.1.tar.gz" } ], "3.0.2": [ { "comment_text": "", "digests": { "md5": "82ba880552f0d127aefb2e43571437eb", "sha256": "beb3df026cdf0d9a636688d6f193301f6f079d0f5a7dcf7359bdb18f41f86dd2" }, "downloads": -1, "filename": "django_subdomain_instances-3.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "82ba880552f0d127aefb2e43571437eb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13439, "upload_time": "2019-07-11T17:03:17", "url": "https://files.pythonhosted.org/packages/1f/53/7a5ee6ca33890b25ba3ef9b0920b4894f0bbc1ae2bd05932f7f7dde9d6e5/django_subdomain_instances-3.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c7de821188a2bad2d4f6ccac8cc0965f", "sha256": "88c50d37745c9f1ebd561a3892d9bd6c4e2e27fe6a702d36409205025337a59c" }, "downloads": -1, "filename": "django-subdomain-instances-3.0.2.tar.gz", "has_sig": false, "md5_digest": "c7de821188a2bad2d4f6ccac8cc0965f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9693, "upload_time": "2019-07-11T17:03:19", "url": "https://files.pythonhosted.org/packages/3e/74/43025b03224fbb6beac948f6adcbbc8b1953eea03fe6dfa04af5f6fdc1c7/django-subdomain-instances-3.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "82ba880552f0d127aefb2e43571437eb", "sha256": "beb3df026cdf0d9a636688d6f193301f6f079d0f5a7dcf7359bdb18f41f86dd2" }, "downloads": -1, "filename": "django_subdomain_instances-3.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "82ba880552f0d127aefb2e43571437eb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13439, "upload_time": "2019-07-11T17:03:17", "url": "https://files.pythonhosted.org/packages/1f/53/7a5ee6ca33890b25ba3ef9b0920b4894f0bbc1ae2bd05932f7f7dde9d6e5/django_subdomain_instances-3.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c7de821188a2bad2d4f6ccac8cc0965f", "sha256": "88c50d37745c9f1ebd561a3892d9bd6c4e2e27fe6a702d36409205025337a59c" }, "downloads": -1, "filename": "django-subdomain-instances-3.0.2.tar.gz", "has_sig": false, "md5_digest": "c7de821188a2bad2d4f6ccac8cc0965f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9693, "upload_time": "2019-07-11T17:03:19", "url": "https://files.pythonhosted.org/packages/3e/74/43025b03224fbb6beac948f6adcbbc8b1953eea03fe6dfa04af5f6fdc1c7/django-subdomain-instances-3.0.2.tar.gz" } ] }