Lightweight django subdomains handler
Project description
=====
Django Lightweight Subdomains Handler
=====
This is a very short Django Middleware to handle each subdomains
with a specific URLconf file.
Example
-------
If you want to have something like::
api.example.org
with a specific URLconf file for each of your subdomains
This what you're looking for!
Quick start
-----------
1. Add this on top of your MIDDLEWARE_CLASSES setting like this::
MIDDLEWARE_CLASSES = (
'django-subdomains-handler.subdomains.SubDomainMiddleware',
...
)
2. Add the SUBDOMAINS_URLCONF dict to your setting project file::
SUBDOMAINS_URLCONF = {
'api': 'api.urls',
}
Where 'api.urls' is your Django-app 'api' and urls is your urls.py module
3. Run your Django project and try to reach api.example.org
Django Lightweight Subdomains Handler
=====
This is a very short Django Middleware to handle each subdomains
with a specific URLconf file.
Example
-------
If you want to have something like::
api.example.org
with a specific URLconf file for each of your subdomains
This what you're looking for!
Quick start
-----------
1. Add this on top of your MIDDLEWARE_CLASSES setting like this::
MIDDLEWARE_CLASSES = (
'django-subdomains-handler.subdomains.SubDomainMiddleware',
...
)
2. Add the SUBDOMAINS_URLCONF dict to your setting project file::
SUBDOMAINS_URLCONF = {
'api': 'api.urls',
}
Where 'api.urls' is your Django-app 'api' and urls is your urls.py module
3. Run your Django project and try to reach api.example.org
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-subdomains-handler-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4f8a40ed1bbf828d800833d8b9d7caf439a7568e377d4d458781a34043ffc82 |
|
MD5 | 79b9d85e1b25b2d0dcc801c22f762f2c |
|
BLAKE2b-256 | a80b1a9d3cc69fae5e8e6d805b82269414a9d107475f2502467ef67c07e870bd |