[Checkins] SVN: megrok.quarry/trunk/ fix typos,
syntactical errors and some verbage
Kevin Smith
kevin at mcweekly.com
Wed May 2 03:35:38 EDT 2007
Log message for revision 74992:
fix typos, syntactical errors and some verbage
Changed:
U megrok.quarry/trunk/README.txt
U megrok.quarry/trunk/src/megrok/quarry/configure.zcml
D megrok.quarry/trunk/src/megrok/quarry/ftests/
-=-
Modified: megrok.quarry/trunk/README.txt
===================================================================
--- megrok.quarry/trunk/README.txt 2007-05-02 07:23:49 UTC (rev 74991)
+++ megrok.quarry/trunk/README.txt 2007-05-02 07:35:37 UTC (rev 74992)
@@ -84,7 +84,7 @@
Skins, layers and grok, oh my!
------------------------------
-As mentioned, Grok 0.9dev has no notion of skins or layers. The quarry.View
+Megrok.quarry implements the notion of skin and layers. The quarry.View
grokker recognizes the quarry.layer directive. This directive is both a
module level and class level driective.
@@ -95,25 +95,25 @@
>>> class Admin(quarry.Skin):
... grok.name('admin') # default, accessible as ++skin++admin
- ... grok.layer(AdminLayer)
+ ... quarry.layer(AdminLayer)
>>> class PublicLayer(quarry.Layer):
... pass
>>> class Public(quarry.Skin):
... grok.name('public') # default name, accessible as ++skin++public
- ... grok.layer(PublicLayer) # must pass interface
+ ... quarry.layer(PublicLayer) # must pass interface
In our app, we associate layers to views as follows
>>> from skin import AdminLayer
>>> class AdminPanel(quarry.View):
- ... grok.layer(AdminLayer)
+ ... quarry.layer(AdminLayer)
Or we can associate layers at a module level
- >>> grok.layer(PublicLayer)
+ >>> quarry.layer(PublicLayer)
>>> class MyPublicView(quarry.View):
... # defaults to PublicLayer
@@ -122,12 +122,6 @@
Viewlets
--------
-Since I'd been hoping Grok would be template neutral to better compete with
-the other frameworks, I've been very resistant to Zope Page Templates. I've
-even come up with multiple scenarios to avoid using macros. But this is all
-nice and good but once you get hooked on ZPT's power, it's hard to deal with
-other templating options.
-
Both quarry.ViewletManager and quarry.Viewlet are base on Lennart Regebro's
megrok.viewlet.
@@ -141,15 +135,23 @@
>>> from megrok import quarry
>>> class MyView(quarry.View):
- ... """<html metal:use-macro="context/@@public/page">
- ... <body>
- ... <metal:block fill-slot="pagecontent">
- ... <span tal:replace="structure provider:body" />
- ... </metal:block>
- ... </body></html>
- ... """
... quarry.template('myproject.app.MyView.__doc__')
+ >>> myview_template = qrok.PageTemplateFile(os.path.join('myview.pt'))
+
+Due to a limitation or a bug in grok.PageTemplate, the talnamespace 'provider'
+is only available to templates accessed as grok.PageTemplateFile.
+
+myview.pt
+
+ <html metal:use-macro="context/@@public/page">
+ <body>
+ <metal:block fill-slot="pagecontent">
+ <span tal:replace="structure provider:body" />
+ </metal:block>
+ </body></html>
+
+
>>> class MenuManager(quarry.ViewletManager):
... grok.context(MyView) # associate viewletmanager with a view
... grok.name('body') #fill tal-namespace 'provide:body'
@@ -193,7 +195,7 @@
---------
The entire Grok team and Zope3 communities for making web programming
-fun again.
+entirely too fun. :)
Modified: megrok.quarry/trunk/src/megrok/quarry/configure.zcml
===================================================================
--- megrok.quarry/trunk/src/megrok/quarry/configure.zcml 2007-05-02 07:23:49 UTC (rev 74991)
+++ megrok.quarry/trunk/src/megrok/quarry/configure.zcml 2007-05-02 07:35:37 UTC (rev 74992)
@@ -1,5 +1 @@
-<configure>
-
-<!--<grok package="" xmlns="http://namespaces.zope.org/grok" />-->
-
-</configure>
\ No newline at end of file
+<configure></configure>
\ No newline at end of file
More information about the Checkins
mailing list