python - 为 MVC 模式组织我的 python 项目,

标签 python google-app-engine

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.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

关于python - 为 MVC 模式组织我的 python 项目,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7427542/

相关文章:

php - Google App Engine (GAE) 本地开发环境是否包含 Memcached 服务?

google-app-engine - 备份 Google App Engine 数据存储时,Google Cloud Storage 中的存储桶名称无效

python - NDB 对计算属性的查询未正确评估

javascript - 来自多个 "active"客户端的 AppEngine 应用程序的可扩展轮询?

Python-- 找不到 pip.ini

python - ubuntu软件中心如何进行 "search"操作?

python - 如何处理具有大量记录的django admin中的选择框

database - 用于处理 App Engine 数据转储的工具

python - 如何将变量从 NodeJs 插入到 python 脚本中?

Python Pandas Dataframe - 基于条件的分组和平均