Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: appengine/monorail/sitewide/custom_404.py

Issue 1868553004: Open Source Monorail (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/monorail/sitewide/__init__.py ('k') | appengine/monorail/sitewide/group_helpers.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is govered by a BSD-style
3 # license that can be found in the LICENSE file or at
4 # https://developers.google.com/open-source/licenses/bsd
5
6 """Page class for generating somewhat informative project-page 404s.
7
8 This page class produces a mostly-empty project subpage, which helps
9 users find what they're looking for, rather than telling them
10 "404. That's an error. That's all we know." which is maddeningly not
11 helpful when we already have a project pb loaded.
12 """
13
14 from framework import monorailrequest
15 from framework import servlet
16
17
18 class ErrorPage(servlet.Servlet):
19 """Page class for generating somewhat informative project-page 404s.
20
21 This page class produces a mostly-empty project subpage, which helps
22 users find what they're looking for, rather than telling them
23 "404. That's an error. That's all we know." which is maddeningly not
24 helpful when we already have a project pb loaded.
25 """
26
27 _PAGE_TEMPLATE = 'sitewide/project-404-page.ezt'
28
29 def get(self, **kwargs):
30 servlet.Servlet.get(self, **kwargs)
31
32 def GatherPageData(self, mr):
33 """Build up a dictionary of data values to use when rendering the page."""
34 if not mr.project_name:
35 raise monorailrequest.InputException('No project specified')
36 return {}
OLDNEW
« no previous file with comments | « appengine/monorail/sitewide/__init__.py ('k') | appengine/monorail/sitewide/group_helpers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698