[Grok-dev] Re: issue #226555: viewlet.url() and how to solve it
faassen at startifact.com
Thu May 8 10:56:58 EDT 2008
Tim Terlegård wrote:
>> * Question: is this interpretation of the issue correct?
> I would expect a viewlet url method to return a url that would allow you
> to see that viewlet in the browser. I don't think a viewlet url method
> should just be an alias to it's view (__parent__) url method. That would be
How can you make the viewlet URL allow you to see the viewlet in the
browser while you *don't* actually publish viewlets on a URL directly?
> The url() method on viewlets and viewlet managers are probably a left-over
> from the old viewlet branch which we based our work on. I'm not sure about
> the use cases for the url method. Is anyone using it?
> I vote for removing it if there's no good use case for it.
I think there is a use case for it. Imagine you have a view. You're now
going to factor it into multiple viewlets. So you're going to factor the
view methods and the template. It'd be nice if you could just move the
code around (which will be using view.url) without suddenly having to
change a lot.
The other is one of conceptual load. If we say that viewlets are very
much like views (they have a template, a URL method, etc), they become
easier to explain and keep straight in your head.
More information about the Grok-dev