问题
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