Skip to content
This repository was archived by the owner on Dec 2, 2018. It is now read-only.

Latest commit

 

History

History
34 lines (21 loc) · 748 Bytes

File metadata and controls

34 lines (21 loc) · 748 Bytes

README

Get the code via svn:

git clone git://github.com/plazix/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.Loader',
    'django.template.loaders.app_directories.Loader',
) 

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