1

Are there any advantages/disadvantages to using SITE_ID in order to manage the sites framework in Django - as opposed to just relying on the hostname and allowing Django to "work out" the site based on that?

I need to provide multiple sites off the same codebase and the same database and I'm just trying to work out whether I need to set the SITE_ID or not.

If I want to use SITE_ID, I'll need a settings.py for each site - which means creating a separate web server (nginx) config for each site and some corresponding uwsgi stuff.

But in theory, I can take the SITE_ID out altogether, point the nginx config at the same server instance, have 1 settings.py and get_current_site will work out which site it's running on at runtime.

Is either way better than the other? If so, why?!

bodger
  • 1,112
  • 6
  • 24

0 Answers0