2011-09-15 3 views
2

Python은 저에게 새로운 것이며, 파일 코드를 구성하는 데 문제가 있습니다.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 

을하고 진짜 문제는 파일 트리 파이썬 환경에서 올바른지입니까?

+0

[구글 앱 엔진의 프로젝트 구조 (의 중복 가능성 http://stackoverflow.com을/questions/48458/project-structure-for-google-app-engine) – systempuntoout

+0

Google에서는 GAE/Python 프레임 워크를 만들었습니다.이 프레임 워크는 매우 유사한 디렉토리 구조를 제공하며 반복적 인 작업을 많이합니다. 이 파일은 http://code.google.com/p/gae-mvc-engine/에서 찾을 수 있습니다. 광범위한 문서는 http://blog.adamcrossland.net/asset/show/mvc-engine-docs –

+0

@ Adam Crossland ok에서 확인하실 수 있습니다. 몇 시간 전에 귀하의 프로젝트가 아직 살아 있는지 여부를 알리는 이메일을 보냈습니다. 감사합니다 –

답변

1

예 귀하의 구조는 작동하거나 내 예를 발견하면 여기에 유용한 내가 작은 응용 프로그램 엔진 응용 프로그램 구성 방법은 다음과 같습니다

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