Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

better handling for twitter auth failure

  • Loading branch information...
commit a556cc77b833d04f1805bd05a3507253d927e2bc 1 parent dc13e72
Peter Bengtsson authored September 20, 2011

Showing 1 changed file with 9 additions and 10 deletions. Show diff stats Hide diff stats

  1. 19  handlers.py
19  handlers.py
@@ -227,10 +227,9 @@ def get(self):
227 227
 
228 228
     def _on_auth(self, user_struct):
229 229
         if not user_struct:
230  
-            url = self.reverse_url('auth_twitter_failed')
231  
-            if self.request.query:
232  
-                url += '?%s' % self.request.query
233  
-            self.redirect(url)
  230
+            options = {}
  231
+            options['page_title'] = "Twitter authentication failed"
  232
+            self.render('twitter_auth_failed.html', **options)
234 233
             return
235 234
         username = user_struct.get('username')
236 235
         self.redis.rpush('usernames', username)
@@ -242,12 +241,12 @@ def _on_auth(self, user_struct):
242 241
                                expires_days=30, path='/')
243 242
         self.redirect('/')
244 243
 
245  
-@route('/auth/twitter/failed', name='auth_twitter_failed')
246  
-class TwitterAuthFailedHandler(BaseAuthHandler):
247  
-    def get(self):
248  
-        options = {}
249  
-        options['page_title'] = "Twitter authentication failed"
250  
-        self.render('twitter_auth_failed.html', **options)
  244
+#@route('/auth/twitter/failed', name='auth_twitter_failed')
  245
+#class TwitterAuthFailedHandler(BaseAuthHandler):
  246
+#    def get(self):
  247
+#        options = {}
  248
+#        options['page_title'] = "Twitter authentication failed"
  249
+#        self.render('twitter_auth_failed.html', **options)
251 250
 
252 251
 @route(r'/auth/logout/', name='logout')
253 252
 class AuthLogoutHandler(BaseAuthHandler):

0 notes on commit a556cc7

Please sign in to comment.
Something went wrong with that request. Please try again.