[Checkins] SVN: grok/trunk/doc/minitutorials/ Added "code-block:
python" to searching.txt and "code-block: html" in macros.txt,
updated www
Darryl Cousins
darryl at darrylcousins.net.nz
Sat Aug 4 19:46:33 EDT 2007
Log message for revision 78589:
Added "code-block: python" to searching.txt and "code-block: html" in macros.txt, updated www
Changed:
U grok/trunk/doc/minitutorials/macros.txt
U grok/trunk/doc/minitutorials/searching.txt
-=-
Modified: grok/trunk/doc/minitutorials/macros.txt
===================================================================
--- grok/trunk/doc/minitutorials/macros.txt 2007-08-04 23:08:46 UTC (rev 78588)
+++ grok/trunk/doc/minitutorials/macros.txt 2007-08-04 23:46:33 UTC (rev 78589)
@@ -71,8 +71,10 @@
metal:define-slot=<slot-name>
-Let's define a very plain page macro::
+Let's define a very plain page macro:
+.. code-block:: html
+
<html metal:define-macro="mypage">
<head></head>
<body>
@@ -111,8 +113,10 @@
metal:use-macro="<macro-location>"
-Our ``app_templates/index.pt`` can be that simple::
+Our ``app_templates/index.pt`` can be that simple:
+.. code-block:: html
+
<html metal:use-macro="context/@@mymacros/mypage">
</html>
@@ -130,8 +134,10 @@
metal:fill-slot="<slot-name>"
where the slot-name must be defined in the macro. Now, change
-``indext.pt`` to::
+``index.pt`` to:
+.. code-block:: html
+
<html metal:use-macro="context/@@mymacros/mypage">
<body>
<!-- slot 'mybody' was defined in the macro above -->
@@ -234,8 +240,10 @@
good style to provide this slots with your homegrown views as well.
To give your pages standard Zope3 look, you can do something like
-this in your page template::
+this in your page template:
+.. code-block:: html
+
<html metal:use-macro="context/@@standard_macros/page">
<head>
<title metal:fill-slot="title">
Modified: grok/trunk/doc/minitutorials/searching.txt
===================================================================
--- grok/trunk/doc/minitutorials/searching.txt 2007-08-04 23:08:46 UTC (rev 78588)
+++ grok/trunk/doc/minitutorials/searching.txt 2007-08-04 23:46:33 UTC (rev 78589)
@@ -30,7 +30,7 @@
in the "setup.py" script. The following directive indicates that zc.catalog
version 1.1.1 is required.
-::
+.. code-block:: python
install_requires=['setuptools',
'grok',
@@ -44,8 +44,9 @@
Example
-------
-::
+.. code-block:: python
+
# interfaces.py
class IProtonObject(Interface):
"""
@@ -53,7 +54,7 @@
"""
body = schema.Text(title=u'Body', required=False)
-::
+.. code-block:: python
# protonobject.py
class ProtonObject(grok.Model):
@@ -65,7 +66,7 @@
def __init__(self, body):
self.body = body
-::
+.. code-block:: python
# app.py
from hurry.query.query import Query, Text
More information about the Checkins
mailing list