[Checkins] SVN: grok/trunk/ finish filling in the holes for the grok components ref doc. several small corrections.
Kevin Teague
kevin at bud.ca
Wed Sep 24 03:44:32 EDT 2008
Log message for revision 91411:
finish filling in the holes for the grok components ref doc. several small corrections.
Changed:
U grok/trunk/doc/reference/components.rst
U grok/trunk/grokdocs/src/grokdocs/grokdocs.py
-=-
Modified: grok/trunk/doc/reference/components.rst
===================================================================
--- grok/trunk/doc/reference/components.rst 2008-09-24 07:01:49 UTC (rev 91410)
+++ grok/trunk/doc/reference/components.rst 2008-09-24 07:44:32 UTC (rev 91411)
@@ -617,7 +617,7 @@
The grok.require decorator can be used to protect methods with a permission.
-.. class:: grok.JSON
+.. class:: grok.XMLRPC
Base class for XML-RPC methods.
@@ -717,9 +717,45 @@
:class:`grok.PageTemplate`
==========================
+Page Templates are the default templating system for Grok, they are an
+implementation of the Template Attribute Language (TAL). Page Templates
+are typically created from a string.
+
+.. code-block:: python
+
+ grok.PageTemplate("<h1>Hello World!</h1>")
+
+.. class:: grok.PageTemplate
+
+ .. method:: _initFactory(factory)
+
+ Template language specific initializations on the view factory.
+
+ .. method:: render(view)
+
+ Renders the template
+
+
:class:`grok.PageTemplateFile`
==============================
+Creates a Page Template from a filename.
+
+.. code-block:: python
+
+ grok.PageTemplateFile("my_page_template.pt")
+
+.. class:: grok.PageTemplateFile
+
+ .. method:: _initFactory(factory)
+
+ Template language specific initializations on the view factory.
+
+ .. method:: render(view)
+
+ Renders the template
+
+
Forms
~~~~~
@@ -827,7 +863,7 @@
.. class:: grok.AddForm
- Base class for add forms.
+ Base class for add forms. Inherits from :class:`grok.Form`.
:class:`grok.EditForm`
======================
@@ -837,7 +873,7 @@
.. class:: grok.EditForm
- Base class for edit forms.
+ Base class for edit forms. Inherits from :class:`grok.Form`.
:class:`grok.DisplayForm`
=========================
@@ -847,13 +883,14 @@
.. class:: grok.DisplayForm
- Base class for display forms.
+ Base class for display forms. Inherits from :class:`grok.Form`.
+
Security
~~~~~~~~
-:class:`Permission`
-===================
+:class:`grok.Permission`
+========================
Permissions are used to protect Views so that they can only be called by
an authenticated principal. If a View in Grok does not have a `grok.require`
@@ -909,38 +946,10 @@
grok.context(zope.interface.Interface)
grok.require('mypackage.Read')
-:func:`grok.define_permission` -- define a permission
-=====================================================
-.. function:: grok.define_permission(name)
+:class:`grok.Role`
+==================
- A module-level directive to define a permission with name
- `name`. Usually permission names are prefixed by a component- or
- application name and a dot to keep them unique.
-
- Because in Grok by default everything is accessible by everybody,
- it is important to define permissions, which restrict access to
- certain principals or roles.
-
- **Example:**
-
- .. code-block:: python
-
- import grok
- grok.define_permission('cave.enter')
-
-
- .. seealso::
-
- :func:`grok.require`, :class:`grok.Permission`, :class:`grok.Role`
-
- .. versionchanged:: 0.11
-
- replaced by :class:`grok.Permission`.
-
-:class:`Role`
-=============
-
Roles provide a way to group together a collection of permissions. Principals
(aka Users) can be granted a Role which will allow them to access all Views
protected by the Permissions that the Role contains.
Modified: grok/trunk/grokdocs/src/grokdocs/grokdocs.py
===================================================================
--- grok/trunk/grokdocs/src/grokdocs/grokdocs.py 2008-09-24 07:01:49 UTC (rev 91410)
+++ grok/trunk/grokdocs/src/grokdocs/grokdocs.py 2008-09-24 07:44:32 UTC (rev 91411)
@@ -12,7 +12,7 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Build grok authorative documentaion.
+"""Builds HTML and Latex versions of the Official Grok Documentation using Sphinx.
"""
import sys
import os.path
More information about the Checkins
mailing list