OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import urllib |
| 6 import webapp2 |
| 7 from google.appengine.api.app_identity import get_application_id |
| 8 |
| 9 |
| 10 APP_NAME = get_application_id() |
| 11 |
| 12 |
| 13 class ListRedirect(webapp2.RequestHandler): |
| 14 |
| 15 def get(self): |
| 16 self.redirect('http://code.google.com/p/chromium/issues/list') |
| 17 |
| 18 |
| 19 class IssueRedirect(webapp2.RequestHandler): |
| 20 |
| 21 def get(self, issue): |
| 22 url = 'http://code.google.com/p/chromium/issues/detail?id=%s' % issue |
| 23 self.redirect(url) |
| 24 |
| 25 |
| 26 class UsernameRedirect(webapp2.RequestHandler): |
| 27 |
| 28 def get(self, username): |
| 29 base = 'http://code.google.com/p/chromium/issues/list' |
| 30 query = '?can=2&q=owner:%s&cells=tiles&colspec=' % username |
| 31 colspec = 'ID+Pri+Mstone+ReleaseBlock+OS+Area+Feature+Status+Owner+Summary' |
| 32 self.redirect(base + query + colspec) |
| 33 |
| 34 |
| 35 application = webapp2.WSGIApplication( |
| 36 [('/', ListRedirect), |
| 37 ('/([0-9]+)', IssueRedirect), |
| 38 ('/~(.*)', UsernameRedirect), |
| 39 ]) |
OLD | NEW |