-1

この Ajax 呼び出しを使用して、Google App Engine アプリケーションで Python ファイルを使用して関数サーバー側を実行したいと考えています。

function test(){
  request = $.ajax({
    url: "test.py?some_vars...",
    type: "get",
  });
  request.done(function (response, textStatus, jqXHR){
    console.log(response);
  });
}

test() を実行すると、コンソールに「test.py not found」という 404 エラーが記録されます。また、「localhost:8080/test.py」をローカルで、「http://APP.appspot.com/test.py」を実際のサーバーで試しました。

「 http://graph.facebook.com/steve 」のような外部ファイルを試すと応答が返ってきますが、ローカル ファイルからは何も取得できません。

ここに私のapp.yamlがあります

application: APP
version: 1
runtime: python27
threadsafe: true
api_version: 1

handlers:

- url: /images
  static_dir: images 

- url: /js
  static_dir: js

- url: /css
  static_dir: css

- url: /.*
  script: apprtc.app
  secure: always

- url: /python
  script: test.app

inbound_services:
- channel_presence

libraries:
- name: jinja2
  version: latest

読んでくれてありがとう

4

2 に答える 2

1

test.py にマップする app.yaml にハンドラを設定する必要があります。

于 2013-07-29T06:19:49.913 に答える
0

次のようなルートが必要です...

- url: /test.py
  script: test.app
于 2013-07-29T12:33:43.587 に答える