开发者

gaeunit, /test link appears to be broken [closed]

开发者 https://www.devze.com 2023-02-08 00:24 出处:网络
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 12 years ago.

I am trying to use geaunit in my gae proj开发者_StackOverflow社区ect. As is recommended, I have put the gaeunit.py file in my project root directory, added the required lines to app.yaml, and placed a test directory in the project root directory.

If I go to http://localhost:8080/test when I am logged in as an administrator I get "Oops! This link appears to be broken."

If I go to http://localhost:8080/test when not logged in as admin I get "Current logged in user test@example.com is not authorized to view this page."

app.yaml

application: myproject
version: 1
runtime: python
api_version: 1

handlers:

- url: /static
static_dir: app/static 

- url: /test.*
login: admin  # This is important if you deploy the test directory in production!
script: gaeunit.py

- url: /.*
script: main.py
login: required
secure: always

Project structure

/myproject
    /app.yaml
    /gaeunit.py
    /test

What am I doing wrong?

0

精彩评论

暂无评论...
验证码 换一张
取 消