[Grok-dev] grok.Site
Martijn Faassen
faassen at infrae.com
Sat Nov 4 08:43:43 EST 2006
Hi there,
Yesterday JW and I started working on grokblog. We're using this as
another experimental package to test grok on, and of course we'd like to
write blogging software. It's only a skeleton now, but we wanted to use
'getSite()' in it and while grok didn't stop us, we needed to pull in 4
or 5 different imports.
ME GROK NO LIKE IMPORTS! ME GROK SMASH IMPORTS!
So, just now I've checked in a new grok mixin, called grok.Site. It can
be mixed into grok.Model or grok.Container. If you do that, the object
will be turned into a site. This means that getSite() works to get the
application root.
We've discussed at the sprint that perhaps we should call this grok.App.
We could still do so, but this would entail renaming getSite to getApp
and potential confusion. So, I've decided to stick with the Site
terminology for now. Perhaps someone can up with a good motivation on
why using grok.App and 'getApp' doesn't actually lead to confusion - it
might not, I just didn't want to run the risk right now. Hoping someone
will show conclusively it's fine to call it App, as it's just better to
speak of apps or applications than it is to speak of sites.
Regards,
Martijn
More information about the Grok-dev
mailing list