나는 Custom Error Responses에 따라 그것을 할 - 애플리케이션 제목은할당량을 초과하면 별도의 페이지를 표시하는 방법은 무엇입니까?
error_handlers:
- error_code: over_quota
file: templates/over_quota.html
으로 업데이트되며, 따라서 파일이 만들어집니다. 그러나 그 페이지 대신 여전히 오류 (예외)가 표시됩니다. 루트 폴더에 app.yaml의 업데이트에 따라 파일을 저장하려고했습니다. 도움이되지 않았습니다.
내가 뭘 잘못하고 있니?
업데이트. @Gwyn Howell 주석에 따라 다음과 같이 정의했습니다.
handlers:
- url: /over_quota.html
static_files: templates/over_quota.html
upload: templates/over_quota.html
error_handlers:
- error_code: over_quota
file: over_quota.html
(1) 테스트 방법 (2) 사용자가 결과에서 볼 수있는 URL? http://www.example.com/over_quota.html
또는 원래 URL일까요?
app.yaml의 페이지 처리기에 템플릿/over_quota.html을 매핑 했습니까? /templates/over_quota.html을 방문하면 어떻게됩니까? –
@GwynHowell, 도와 주셔서 감사합니다. /templates/over_quota.html로 이동하면 페이지가 표시되지 않습니다. 그리고 나는 페이지 핸들러를 정의하지 않았다. 어떻게 생겼을 까? https://developers.google.com/appengine/docs/python/config/appconfig#Static_File_Pattern_Handlers를 읽었지만 도움이되지 않습니다. 사용자가 볼 URL은 무엇입니까? 그것은 원래의 URL이나 다른 것입니까? –
@GwynHowell, 답으로 의견을 게시하십시오. 나는 또한 질문을 업데이트했다. –