Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 为什么GAE没有检测到我的表单页面?_Python_Google App Engine - Fatal编程技术网

Python 为什么GAE没有检测到我的表单页面?

Python 为什么GAE没有检测到我的表单页面?,python,google-app-engine,Python,Google App Engine,我完全是一个使用GAE的初学者,我正在尝试为GAE部署一个测试 这样做的目的是创建一个表单,用户在其中输入年、月和日,然后生成属于该日期的一周中的某一天 当我使用“dev_appserver.py”在localhost:8080中尝试它时,它工作正常,但在我将其部署到GAE之后,找不到页面“/form” 这是应用程序的链接: 我猜这可能与我的app.yaml文件有关,但我不确定。 如果它有帮助的话,那么包括瓶子.py在内的所有三个文件都在一个文件夹中 编辑*当我使用GAE launcher的GU

我完全是一个使用GAE的初学者,我正在尝试为GAE部署一个测试

这样做的目的是创建一个表单,用户在其中输入年、月和日,然后生成属于该日期的一周中的某一天

当我使用“dev_appserver.py”在localhost:8080中尝试它时,它工作正常,但在我将其部署到GAE之后,找不到页面“/form”

这是应用程序的链接:

我猜这可能与我的app.yaml文件有关,但我不确定。 如果它有帮助的话,那么包括瓶子.py在内的所有三个文件都在一个文件夹中

编辑*当我使用GAE launcher的GUI版本时,表单页面也不起作用

这是我的密码:

main.py

"""
Author: Yao Jiang
Filename: main.py
Copyright (c) 2012 All rights reserved.
"""

import bottle
from google.appengine.ext.webapp import util
from bottle import route, template, request
from datetime import date

@route('/')
def hello():
    return "Hello New World!"

@route('/form')
def userDate():
    if request.GET.get('userDate', '').strip():
        dayOfWeek = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];
        year = request.GET.get('year');
        month = request.GET.get('month');
        day = request.GET.get('day');

        userDate = date(int(year), int(month), int(day));
        choice = dayOfWeek[date.weekday(userDate)];

        return "<center><h1>The day of the week for %s is %s.</h1></center>" % (userDate.strftime("%b %d, %Y"), choice);
    else:
        return template('form.tpl');

util.run_wsgi_app(bottle.default_app())
第三方物流

%# template for the date form
<html>
    <body>
        <p>FIND THE DAY OF THE WEEK</p>
        <form action="/form" method="GET">
        Year: <input type="text" size="10" maxlength="10" name="year">
        Month: <input type="text" size="10" maxlength="10" name="month">
        Day: <input type="text" size="10" maxlength="10" name="day">        
        <input type="submit" name="userDate" value="submit">
        </form>
    </body>
</html>
日期表单的模板 找到一周中的哪一天

年份: 月份: 日期:
/表单是应用程序引擎上的保留url:


选择其他路径,它应该可以正常工作。

/form是app engine上的保留url:


选择不同的路径,它应该可以正常工作。

OMFG!!!非常感谢。哇,我想找到这方面的信息,真想不到。。非常感谢!!!!!!!!!天哪!!!非常感谢。哇,我想找到这方面的信息,真想不到。。非常感谢!!!!!!!!!
%# template for the date form
<html>
    <body>
        <p>FIND THE DAY OF THE WEEK</p>
        <form action="/form" method="GET">
        Year: <input type="text" size="10" maxlength="10" name="year">
        Month: <input type="text" size="10" maxlength="10" name="month">
        Day: <input type="text" size="10" maxlength="10" name="day">        
        <input type="submit" name="userDate" value="submit">
        </form>
    </body>
</html>