Django项目存在于系统上是否重要? [英] Does it matter where the Django project exists on the system?
本文介绍了Django项目存在于系统上是否重要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
无关紧要 - 选择组织符合您的需求。
我大致遵循这个指南,当创建一个服务器来处理几个Django站点,我喜欢它使用的文件夹组织。一些好处:
- 所有Django网站都在一个特殊的django用户的主目录中
- 是一个域文件夹,然后是包含django项目,日志,wsgi文件和其他文件的每个站点的文件夹
- VirtualHost容器各自在自己的文件中,可以使用httpd.conf可管理。
Aside from not deploying a Django project to the web site root directory, is there any specific benefit to running Django projects from one location, e.g. /var/django-projects/**xxxxx-project/ vs. (in a shared hosting environment) running each Django project in a domain folder, e.g. **/vhost/mydomain.com/xxxxx-project?
解决方案
Doesn't matter -- choose an organization that fits your needs.
I roughly followed this guide when creating a server to handle several Django sites, and I like the folder organization it uses. A couple of benefits:
- All Django sites are in a special django user's home directory
- There is a domains folder, then a folder for every site that contains the django projects, logs, wsgi files, and other files
- VirtualHost containers are each in the own file, keeing httpd.conf manageable.
这篇关于Django项目存在于系统上是否重要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文