Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
app to provide subdomain functionality in django project
tree: 9cabf3764c

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
subdomains
.gitignore
README

README

STEPS:
-----
1. Include 'subdomains' in installed apps.
    
2. Middlewares
    a. subdomains.middleware.GetSubdomainMiddleware
    b. subdomains.middleware.ThreadLocals
    c. subdomains.middleware.RedirectOnInvalidSubdomain

3. include subdomains urls in urls.py
    
    url(r'^', include('subdomains.urls')),

4. create the subdomain table
    python manage.py syncdb
 

*. matched subdomain/domain object is available via thread locals, 
    from subdomains.middleware import get_current_subdomain
    subdomain_obj = get_current_subdomain()
Something went wrong with that request. Please try again.