내 app.yaml
및 URL 관리에 대한 도움이 필요합니다. 스크립트는 ting.py
, searchandler.py
및 toplawfirms.py
입니다. 나는 ting.py
먼저 만들고 난 app.yaml
app.yaml을 각 스크립트의 최상위 페이지 만 남겨 두는 방법은 무엇입니까?
- url: /.*
script: ting.py
에있는 다른 모든 페이지 ting.py
에 선언되어있다. 하지만 나는 두 번째 레벨이되지 않도록 searchhandler.py
과 toplawfirms.py
으로 실수 한 것으로 생각합니다. 내 app.yaml
나는 그들의 스크립트의 다른 모든 페이지를 선언 할 수 있도록
...
- url: /???
script: searchhandler.py
- url: /???
script: toplawfirms.py
- url: /.*
script: ting.py
...
처럼 보일 것이다 그래야 지금 app.yaml
에만 세 개의 스크립트를 가질 수있는 방법이 있습니까?
application: ting-1
version: 1
runtime: python
api_version: 1
handlers:
- url: /_ah/mail/.+
script: incoming.py
login: admin
- url: /stylesheets
static_dir: stylesheets
- url: /favicon.ico
static_files: static/images/favicon.ico
upload: static/images/favicon.ico
- url: /image
script: toplawfirms.py
- url: /imageupload
script: toplawfirms.py
- url: /imagesave
script: toplawfirms.py
- url: /imageresize
script: toplawfirms.py
- url: /displayimage
script: toplawfirms.py
- url: /histogram
script: toplawfirms.py
- url: /testurlopen
script: toplawfirms.py
- url: /printdb
script: toplawfirms.py
- url: /cropimage
script: toplawfirms.py
- url: /jquerytest
script: toplawfirms.py
- url: /urlopenppp
script: toplawfirms.py
- url: /deleteone
script: toplawfirms.py
- url: /enterppp
script: toplawfirms.py
- url: /saveppp
script: toplawfirms.py
- url: /searchhandler
script: searchhandler.py
- url: /site
script: searchhandler.py
- url: /searchall
script: searchall.py
- url: /.*
script: ting.py
inbound_services:
- mail
나는'데프 주()를 제거해야 .py' 또는'searchhandler.py'와'toplawfirms.py'를 제거하고 그 안에있는 모든 코드를'ting.py'로 옮기고'ting.py' 만 사용 하시겠습니까? – Zeynel
둘 중 하나; 선호하는 것은 앱에 따라 다릅니다. 전자의 경우에는 핸들러를 참조하기 위해 ting.py에서'searchhandler'와'toplawfirms '를 가져와야합니다. –