[Grok-dev] Getting the application in views and viewlets

Peter Bengtsson peter at fry-it.com
Sun Jun 15 15:26:23 EDT 2008


2008/6/15 Graham Stratton <gns24 at mythic-beasts.com>:
> I seem to quite often need to get the application, or the application url,
> in views and viewlets.
>
> Views have the application_url method, but viewlets don't. I'd be tempted to
> suggest that both views and viewlets grow an `application` property.
>
+1

> Do other people find this a common requirement, or is there something wrong
> with the way I'm developing applications?
>
I use it a lot too. Not just the URL but also the object too.
(Truth is I only have 3-4 Grok apps under by belt but have done many
many zope2 apps with this pattern)

> Regards,
>
> Graham_______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
>



-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Grok-dev mailing list