The docstring says "For backwards compatibility you can also pass in a
params dictionary which is turned into url params, ..."
However, it's the other way round now, **kwargs are supported for
backward compatibility only (with a deprecation warning), and only
passing a dict in params seems to be supported in the future. (Is this
really what we want?)
Second, the docstring says "In general `tg.url is just a proxy for
`pylons.url` which is in turn a proxy for routes `url_for` function."
However, `tg.url` does not seem to resort to `pylons.url` any more.
I'd like to fix that docstring, but I'm not sure whether these changes
are intentional or not.
Remark made by Jonathan on tg-trunk:
This also seems to have broken the pagination system (when you show the
pagination links, it throws an error 500).
See also #2272 and #2371 for other issues with `tg.url()`.
--
Ticket URL: <http://trac.turbogears.org/ticket/2437>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
For the pagination problem, see also #2455.
--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:2>
I'm also getting these deprecation warnings in quickstarted apps:
{{{
DeprecationWarning: Passing in keyword arguments as url components is
deprecated.
}}}
--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:1>
* milestone: 2.1 => 2.1b2
--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:3>
Thanks. For the records and better traceability of fixes you should also
link to the changeset of your fixes (in this case,
[http://bitbucket.org/turbogears/tg-dev/changeset/c345086f9280/
c345086f9280] and [http://bitbucket.org/turbogears/tgdevtools-
dev/changeset/78d3869f7deb/ 78d3869f7deb]).
Also, I'm missing a motivation ''why'' passing keyword parameters was
discarded, since I think it was a handy and intuitive feature. I'm sure
there is a reason, but I currently don't see it.
--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:5>
* status: new => closed
* resolution: => fixed
--
Ticket URL: <http://trac.turbogears.org/ticket/2437#comment:4>