ct at gocept.com
Tue Oct 31 09:24:00 EST 2006
Martijn Faassen wrote:
> Hi there,
> Even though I haven't received feedback yet, I have implemented
> view.url() as described at the bottom of my mail yesterday. I'll repeat
> it here, slightly updated:
> class IGrokView(Interface):
> # XXX haven't implemented this at the time of writing.
> def redirect(url):
> """Redirect to given URL"""
> def url(obj=None, name=''):
> """Construct URL.
> If no arguments given, construct URL to view itself.
> If only obj argument is given, construct URL to obj.
> If only name is given (or string as first argument, a bit of
> magic there), construct view URL to view with that name on our
> If both object and name arguments are supplied, construct
> view URL to view on that object.
Ah. I like this much better than what you described yesterday including
'parent_url', 'sibling_url' etc.
Passing an object and a name (subpath?) seems reasonable. What about
supporting query arguments via a dict?
gocept gmbh & co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - ct at gocept.com - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20061031/b66bc905/signature.bin
More information about the Grok-dev