Web Application (Django) typical project folder structure

ぃ、小莉子 提交于 2019-11-27 17:34:56

问题


I am very new to web development, just wanted to figure out if there is a recommended(preferred) project folder structure to use (may be even specific to Django based projects).

Thank you.


回答1:


I've seen a few opinions on this:

  • http://jacobian.org/writing/django-apps-with-buildout/
  • http://github.com/garethr/django-project-templates
  • http://www.stereoplex.com/2008/dec/2/fez-djangoskel-django-projects-and-apps-as-eggs/

If you're new to web development though, you might want to consider just using the folder structure django-admin and manage.py give you (as Ben suggests). That will let you learn how to write a web app, and you can move the files around later as you need.




回答2:


I think the folder structure and other best practices are covered by Lincoln Loop's Django Best Practices document.

They even have a project on github to auto generate the layout in their recommended structure.

I think it is very similar and in line with the Pinax recommendations; but you might want to verify this part.



来源:https://stackoverflow.com/questions/2282034/web-application-django-typical-project-folder-structure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!