You should check the structure of "sites" . If you've ever used the Django built-in administrator, then you probably saw a section of sites where example.com is the only default site.
An example of the real world, from the link I provided:
Link content to multiple sites
Websites powered by Django LJWorld.com and Lawrence.com are run by the same news organization, the Lawrence Journal-World in Lawrence, Kansas. LJWorld.com focuses on news, while Lawrence.com focuses on local entertainment. But sometimes editors want to publish an article on both sites.
A dead way to solve the problem would be for the site to require producers to publish the same story twice: once for LJWorld.com and again for Lawrence.com. But this is inefficient for site manufacturers and its excess for storing multiple copies of the same story in the database.
The best solution is simple: both sites use the same article database, and the article is associated with one or more sites.
So, instead of the "City" field, you should add a field to your model for the site, for example:
sites = models.ManyToManyField(Site)
You basically have one database that all of your cities use. Convenient, but I wonder how it will decrease in the future. I myself am launching a similar project and will use the Django website structure to get the project from the ground. I am interested in hearing about a more scalable solution on behalf of the database though.
source share