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

Unified Diff: chromium-shortener/www-crbug/redirect.py

Issue 12208137: Add code for www.crbug and new.crbug appengine apps. (Closed) Base URL: https://src.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromium-shortener/www-crbug/app_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromium-shortener/www-crbug/redirect.py
===================================================================
--- chromium-shortener/www-crbug/redirect.py (revision 0)
+++ chromium-shortener/www-crbug/redirect.py (revision 0)
@@ -0,0 +1,39 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import urllib
+import webapp2
+from google.appengine.api.app_identity import get_application_id
+
+
+APP_NAME = get_application_id()
+
+
+class ListRedirect(webapp2.RequestHandler):
+
+ def get(self):
+ self.redirect('http://code.google.com/p/chromium/issues/list')
+
+
+class IssueRedirect(webapp2.RequestHandler):
+
+ def get(self, issue):
+ url = 'http://code.google.com/p/chromium/issues/detail?id=%s' % issue
+ self.redirect(url)
+
+
+class UsernameRedirect(webapp2.RequestHandler):
+
+ def get(self, username):
+ base = 'http://code.google.com/p/chromium/issues/list'
+ query = '?can=2&q=owner:%s&cells=tiles&colspec=' % username
+ colspec = 'ID+Pri+Mstone+ReleaseBlock+OS+Area+Feature+Status+Owner+Summary'
+ self.redirect(base + query + colspec)
+
+
+application = webapp2.WSGIApplication(
+ [('/', ListRedirect),
+ ('/([0-9]+)', IssueRedirect),
+ ('/~(.*)', UsernameRedirect),
+ ])
« no previous file with comments | « chromium-shortener/www-crbug/app_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698