This question shows research effort; it is useful and clear
1
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
I want to run Three websites in single Django project...
Site_1,Site_2,Site_3 has same models.py,same views.py and same urls.py file..
But different sqlite.db file..different template Dir.will it be possible to run sites under this scenario
我已经尝试过你的场景......我已经包含了一个标志变量,settings.py你可以设置flag值1,2 or 3并基于flag你可以加载的值templates and static DIR......然后你可以使用相同views.py,urls.py,models.py的......但请确保你使用应用程序的数据库文件对于所有三个网站,但名称可以更改....因为它是特定于应用程序的,如果您使用另一个应用程序的数据库文件,您将收到错误...希望它有帮助...