summaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorBen Bangert <ben@groovie.org>2015-01-17 13:35:41 -0800
committerBen Bangert <ben@groovie.org>2015-01-17 13:35:41 -0800
commitdcdb3f39a072dbb8fcc7bf8365be05af5ca4b4e1 (patch)
treebeb4f35dc887bfa9ae09a593c0ea1d19870c1e10 /routes
parentc896e82611f9f4ae7962de7dfa4734d7c4342be6 (diff)
downloadroutes-dcdb3f39a072dbb8fcc7bf8365be05af5ca4b4e1.tar.gz
* Fix regression that didn't allow passing in params 'host', 'protocol', or
'anchor'. They can now be passed in with a trailing '_' as was possible before commit d1d1742903fa5ca24ef848a6ae895303f2661b2a. Fixes #7.
Diffstat (limited to 'routes')
-rw-r--r--routes/util.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/routes/util.py b/routes/util.py
index 5b3fae1..9834ad5 100644
--- a/routes/util.py
+++ b/routes/util.py
@@ -184,6 +184,8 @@ def url_for(*args, **kargs):
for key in ['anchor', 'host', 'protocol']:
if kargs.get(key):
del kargs[key]
+ if key+'_' in kargs:
+ kargs[key] = kargs.pop(key+'_')
config = request_config()
route = None
static = False
@@ -326,6 +328,8 @@ class URLGenerator(object):
for key in ['anchor', 'host', 'protocol']:
if kargs.get(key):
del kargs[key]
+ if key+'_' in kargs:
+ kargs[key] = kargs.pop(key+'_')
route = None
use_current = '_use_current' in kargs and kargs.pop('_use_current')