Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Octocat-spinner-32 multisite Edit template loader November 18, 2009
Octocat-spinner-32 .gitignore Init November 05, 2009
Octocat-spinner-32 INSTALL.txt Edit README November 05, 2009
Octocat-spinner-32 README.markdown Edit README November 05, 2009
Octocat-spinner-32 setup.py Edit app name November 05, 2009
README.markdown

README

Get the code via svn:

git clone git://github.com/shestera/django-multisite.git django-multisite

Add the django-multisite/multisite folder to your PYTHONPATH.

Replace your SITE_ID in settings.py to:

from multisite.threadlocals import SiteIDHook
SITE_ID = SiteIDHook()

Add to settings.py TEMPLATE_LOADERS:

TEMPLATE_LOADERS = ( 
    'multisite.template_loader.load_template_source',
    'django.template.loaders.app_directories.load_template_source', 
) 

Edit to settings.py MIDDLEWARE_CLASSES:

MIDDLEWARE_CLASSES = (
    ...
    'multisite.middleware.DynamicSiteMiddleware',
    ...
)

Create a directory settings.TEMPLATE_DIRS directory with the names of domains, such as:

mkdir templates/example.com
Something went wrong with that request. Please try again.