diff roundup/anypy/urllib_.py @ 5121:894aa07be6cb

issue2550785: Using login from search (or logout) fails. when logging in from a search page or after a logout it fails with an error. The fix also keeps the user on the same page they started from (e.g. search results) before the login. There are two parts to this: 1) changes to the templates to properly define the __came_from form element. 2) code changes to the LoginAction code in roundup/cgi/actions.py. New test code added. Needed some additional functions from urllib so urllib_.py got a change.
author John Rouillard <rouilj@ieee.org>
date Sun, 03 Jul 2016 12:32:35 -0400
parents dfd0bcc947e5
children 88dbacd11cd1
line wrap: on
line diff
--- a/roundup/anypy/urllib_.py	Sun Jul 03 12:23:36 2016 -0400
+++ b/roundup/anypy/urllib_.py	Sun Jul 03 12:32:35 2016 -0400
@@ -1,8 +1,8 @@
 
 try:
     # Python 3+
-    from urllib.parse import quote, urlparse
+    from urllib.parse import quote, urlencode, urlparse, parse_qs, urlunparse
 except:
     # Python 2.5-2.7
-    from urllib import quote
-    from urlparse import urlparse
+    from urllib import quote, urlencode
+    from urlparse import urlparse, parse_qs, urlunparse

Roundup Issue Tracker: http://roundup-tracker.org/