Multisite is a Django plugin that facilitates building and managing multiple websites using a single Django installation. This feature-packed software provides an easy-to-use admin interface and supports a range of customization options for different sites.
To get started, you can obtain the code via svn:
git clone git://github.com/shestera/django-multisite.git django-multisite
Once you have the code, you'll want to add the django-multisite/multisite folder to your PYTHONPATH. Then, you'll need to replace your SITE_ID in settings.py with the following:
from multisite.threadlocals import SiteIDHook
SITE_ID = SiteIDHook()
After that, you'll need to add the multisite template loader to your TEMPLATE_LOADERS configuration in settings.py:
TEMPLATE_LOADERS = (
'multisite.template_loader.load_template_source',
'django.template.loaders.app_directories.load_template_source',
)
Next, you'll want to add the DynamicSiteMiddleware to your MIDDLEWARE_CLASSES:
MIDDLEWARE_CLASSES = (
...
'multisite.middleware.DynamicSiteMiddleware',
...
)
Finally, you'll need to create a settings.TEMPLATE_DIRS directory with the names of the domains you want to support. For example, you might create a directory called "templates/example.com".
Overall, if you need to support multiple sites in your Django project, then django-multisite is definitely worth checking out.
Version 0.1: N/A