I am trying to use multiple sites in one mezzanine project. I have multiple themes (moderna, nova):
HOST_THEMES = [
('.......', 'nova'),
('different.....', 'moderna'),
]
The actual names (first column in HOST_THEMES) correspond to real Sites in DB created with admin.
However, the mezzanine completely ignore the request host (or url) and directly go for SITE_ID in settings.py. So I can switch the themes by changing SITE_ID in settings. If I remove the SITE_ID from settings, It crash with an error that SITE_ID is missing (something like that). I am using the django testing server and the "request host header" seems to be correct in browser.
How to force the mezzanine to choose the correct SITE_ID according to the request host? What I am missing?
It should not work. Every site in Django should have its own instance.
However, the problem of multiple sites on one Django instance is possible to solve with https://code.djangoproject.com/wiki/MultiHostMiddleware