Archive for May, 2008

Mixed Notes

I recently switched to using Grok with Cygwin on Windows based PCs - once you’ve got the Cygwin parts in place there is no problem to get Grok compiled with Python2.4 or Python2.5. Application startup is 10-20% faster btw. Integration with Eclipse is smooth, as you use the shell from Cygwin (buildout, paster, zopectl) and […]

Grok root-level views

Sometimes you just want to have something sit at http://localhost:8080/
– and not get automatically redirected to the applications form /
admin interface.
Register your module in the context of ‘IRootFolder’ and provide
the ‘defaultView’ name ‘index.html’ on any of its view classes.

=== rootlevelviews.py ===

import grok
from zope.app.folder.interfaces import IRootFolder

grok.context(IRootFolder)

class Index(grok.View):
grok.name(’index.html’)

=========================

That’s one method of doing […]


About

You are currently browsing the d2m weblog archives for the month May, 2008.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.


Categories