[英]Organize my python project for MVC patern,
Python对我来说是新手,在组织文件代码时遇到了问题。
我想做这样的事情:
./
/views
index.html // Django files
/controlers
main.py
/models
Greeting.py // I take the same classe exemple of Google App Engine Website
/libs
xxx.py //some Lib and tools classes
/static
/js
/css
/images
真正的问题是在python环境中文件树是正确的吗?
是的,您的结构可以运行,或者如果您发现我的示例有用,这是我组织一个较小的App Engine应用程序的方式:
.
├── app.yaml
├── conf.py
├── main.py
├── model.py
├── static
│ ├── 1.gif
│ ├── 2.gif
│ ├── 3.gif
│ ├── 4.gif
│ ├── anim.gif
│ ├── main.css
│ ├── main.js
└── templates
├── base.html
├── error.html
├── info.html
├── upload.html
├── user.html
└── welcome.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.