我在访问Google App Engine主页类的Post实例中的变量时遇到问题。由于我无法将Post实例名称更改为init,因此我不确定如何访问变量映像
class MainPage(Handler):
def get(self):
dictionary = getpure()
img = "http://www.apogeephoto.com/wp-content/uploads/2016/06/14.jpg"
self.render("front.html", dictionary=dictionary, img = img)
def post(self):
image = self.request.get("image")
dictionary = getpure()
if image == "one":
img = "www.someaddress.jpg"
elif image == "two":
img = "someaddress.jpg"
elif image == "three":
img = "someaddress.jpg"
self.render("front.html", dictionary=dictionary, img=img)
目前没有回答
相关问题 更多 >
编程相关推荐