在Google App Engine Django Helper中,用于查找正确视图的app.yaml或url.py文件是什么?

时间:2021-07-05 18:07:41

I'm pretty new to this and while I'm pretty sure this is an easy question, I haven't been able to figure it out myself.

我对此很陌生,虽然我很确定这是一个简单的问题,但我自己也无法弄明白。

2 个解决方案

#1


Short answer, both.

简短的回答,两者。

http://markmail.org/message/4zhnpwylz6khhytb

#2


The app.yaml should point to the main.py that is included in the appengine helper. That way, you can create and use urls.py for your app.

app.yaml应该指向appengine helper中包含的main.py.这样,您就可以为您的应用创建和使用urls.py.

Since you can point to any other view from app.yaml, it is possible you can use it directly without urls.py; but then it's not django anymore.

由于您可以从app.yaml指向任何其他视图,因此您可以直接使用它而无需urls.py;但那时它不再是django了。

#1


Short answer, both.

简短的回答,两者。

http://markmail.org/message/4zhnpwylz6khhytb

#2


The app.yaml should point to the main.py that is included in the appengine helper. That way, you can create and use urls.py for your app.

app.yaml应该指向appengine helper中包含的main.py.这样,您就可以为您的应用创建和使用urls.py.

Since you can point to any other view from app.yaml, it is possible you can use it directly without urls.py; but then it's not django anymore.

由于您可以从app.yaml指向任何其他视图,因此您可以直接使用它而无需urls.py;但那时它不再是django了。