Full support for multisite with security. Uses reuqest processing for filtering page and django-allowedsites
for ALLOWED_HOSTS based on the domains in django.contrib.sites.
pip install leonardo-multisite
And enable it in the admin or add MULTI_SITE_ENABLED
to your settings.
or as leonardo bundle
pip install django-leonardo[multisite]
settings.py:
MULTISITE_ENABLED = True MIDDLEWARES += ('leonardo_multisite.middleware.MultiSiteMiddleware',) from allowedsites import CachedAllowedSites ALLOWED_HOSTS = CachedAllowedSites()