OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import urllib | 5 import urllib |
6 | 6 |
7 from google.appengine.ext import deferred | 7 from google.appengine.ext import deferred |
8 # F0401: 9,0: Unable to import 'webapp2' | 8 # F0401: 9,0: Unable to import 'webapp2' |
9 # pylint: disable=F0401 | 9 # pylint: disable=F0401 |
10 import webapp2 | 10 import webapp2 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 # R0201: 93,2:FetchPagesAction.get: Method could be a function | 67 # R0201: 93,2:FetchPagesAction.get: Method could be a function |
68 # pylint: disable=R0201 | 68 # pylint: disable=R0201 |
69 def get(self): | 69 def get(self): |
70 deferred.defer(app.fetch_pages) | 70 deferred.defer(app.fetch_pages) |
71 | 71 |
72 | 72 |
73 class MainAction(base_page.BasePage): | 73 class MainAction(base_page.BasePage): |
74 | 74 |
75 def get(self): | 75 def get(self): |
76 self.redirect('/p/chromium/console') | 76 args = self.request.query_string |
| 77 self.redirect('/p/chromium/console' + '?' + args) |
77 | 78 |
78 | 79 |
79 # Call initial bootstrap for the app module. | 80 # Call initial bootstrap for the app module. |
80 app.bootstrap() | 81 app.bootstrap() |
81 base_page.bootstrap() | 82 base_page.bootstrap() |
82 | 83 |
83 # GAE will cache |application| across requests if we set it here. See | 84 # GAE will cache |application| across requests if we set it here. See |
84 # http://code.google.com/appengine/docs/python/runtime.html#App_Caching for more | 85 # http://code.google.com/appengine/docs/python/runtime.html#App_Caching for more |
85 # info. | 86 # info. |
86 application = webapp2.WSGIApplication( | 87 application = webapp2.WSGIApplication( |
87 [('/', MainAction), | 88 [('/', MainAction), |
88 ('/p/(.*)', PageAction), | 89 ('/p/(.*)', PageAction), |
89 ('/tasks/fetch_pages', FetchPagesAction)]) | 90 ('/tasks/fetch_pages', FetchPagesAction)]) |
OLD | NEW |