Changeset 3755
- Timestamp:
- 11/24/07 19:55:52 (8 months ago)
- Files:
-
- branches/1.1/CHANGELOG.txt (modified) (1 diff)
- branches/1.1/turbogears/controllers.py (modified) (1 diff)
- branches/1.1/turbogears/tests/test_controllers.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/CHANGELOG.txt
r3745 r3755 68 68 Every string starting with a dash (``-``) indicates that the column will 69 69 have its default ordering reversed (#1618). 70 * turbogears.url() allows to to create an url with multiple values for the 71 same key (#1456). 70 72 71 73 Fixes branches/1.1/turbogears/controllers.py
r3455 r3755 514 514 pairs = [(key, value)] 515 515 for (k,v) in pairs: 516 if isinstance(value, unicode): 517 value = value.encode("utf8") 516 if v is None: 517 continue 518 if isinstance(v, unicode): 519 v = v.encode("utf8") 518 520 args.append("%s=%s" % (k, urllib.quote(str(v)))) 519 521 if args: branches/1.1/turbogears/tests/test_controllers.py
r3690 r3755 585 585 ["/foo?bar=qwer&bar=asdf", "/foo?bar=asdf&bar=qwer"] 586 586 587 def test_unicode(self): 588 """url() can handle unicode parameters""" 589 testutil.create_request("/") 590 assert url('/', x=u'\N{LATIN SMALL LETTER A WITH GRAVE}' 591 u'\N{LATIN SMALL LETTER E WITH GRAVE}' 592 u'\N{LATIN SMALL LETTER I WITH GRAVE}' 593 u'\N{LATIN SMALL LETTER O WITH GRAVE}' 594 u'\N{LATIN SMALL LETTER U WITH GRAVE}') \ 595 == '/?x=%C3%A0%C3%A8%C3%AC%C3%B2%C3%B9' 596 597 def test_list(self): 598 """url can handle list parameters, with unicode too""" 599 testutil.create_request("/") 600 assert url('/', foo=['bar', u'\N{LATIN SMALL LETTER A WITH GRAVE}']) \ 601 == '/?foo=bar&foo=%C3%A0' 602 587 603 def tearDown(self): 588 604 turbogears.config.update({"server.webpath" : ""}) 589 605 turbogears.startup.startTurboGears() 606 590 607 591 608 def test_index_trailing_slash():