Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
禁止されたビューのビューを追加します。
from pyramid.exceptions import Forbidden config.add_view(forbidden_view, context=Forbidden)
ログイン画面にリダイレクトされます。
しかし、管理者アクセスが必要な管理者用のものをいくつか追加しました。「権限がありません」画面を表示したいだけです。禁止されたビューでそれを確認するにはどうすればよいですか?
Pyramid が許可拒否の結果として Forbidden エラーを発生させると、情報が失われるのではないかと心配しています。TODO.txt には、Forbidden エラーを通過するための項目があります。