2011-09-15 19 views
2

Python對我來說是新的,我有問題來組織我的文件代碼。組織我的MVC模板的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環境是否正確?

+0

[谷歌應用程序引擎項目結構(可能重複http://stackoverflow.com/questions/48458/project-structure-for-google-app-engine) – systempuntoout

+0

我已經創建了一個GAE/Python框架,它提供了一個非常類似於目錄結構的目錄結構,併爲您做了大量的重複性工作。你可以在這裏找到它:http://code.google.com/p/gae-mvc-engine/。廣泛的文檔可以在以下網址找到:http://blog.adamcrossland.net/asset/show/mvc-engine-docs –

+0

@Adam Crossland好的,我幾個小時前給你發了一封電子郵件,告訴你你的項目是否還活着。謝謝 –

回答

1

是你的結構工程或如果你發現我的例子在這裏有用的是我如何組織一個小的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