From 46997a51ed0ceb16ddbac712fbcb552a86cdc9e2 Mon Sep 17 00:00:00 2001 From: Stephen Burrows Date: Fri, 13 May 2011 13:22:11 -0400 Subject: [PATCH] Moved templatetag docs into the respective modules and fleshed them out. Centralized adding of template tags to builtins. Added __all__ declarations to philo.models.*. Added a bit of documentation to Page.render_to_string about context variables. --- docs/models/entities.rst | 1 + docs/templatetags.rst | 67 +++++----------------------- philo/models/__init__.py | 14 ++++-- philo/models/base.py | 3 ++ philo/models/collections.py | 5 ++- philo/models/nodes.py | 5 ++- philo/models/pages.py | 10 +++-- philo/templatetags/collections.py | 20 +++++++-- philo/templatetags/containers.py | 20 +++++++-- philo/templatetags/embed.py | 34 ++++++++++---- philo/templatetags/include_string.py | 24 +++++----- philo/templatetags/nodes.py | 29 +++++++++--- 12 files changed, 135 insertions(+), 97 deletions(-) diff --git a/docs/models/entities.rst b/docs/models/entities.rst index d794c90..20a6e80 100644 --- a/docs/models/entities.rst +++ b/docs/models/entities.rst @@ -16,6 +16,7 @@ Attributes :members: .. automodule:: philo.models.base + :noindex: :members: attribute_value_limiter .. autoclass:: JSONValue diff --git a/docs/templatetags.rst b/docs/templatetags.rst index 60224eb..97f0c56 100644 --- a/docs/templatetags.rst +++ b/docs/templatetags.rst @@ -7,68 +7,25 @@ Collections +++++++++++ .. automodule:: philo.templatetags.collections - - .. templatetag:: membersof - - membersof - --------- - - Usage:: - - {% membersof with . as %} -.. automodule:: philo.templatetags.containers +Containers +++++++++++ - .. templatetag:: container - - container - --------- - - Usage:: - - {% container [[references .] as ] %} +.. automodule:: philo.templatetags.containers -.. automodule:: philo.templatetags.embed - .. templatetag:: embed - - embed - ----- - - The {% embed %} tag can be used in two ways. - - To set which template will be used to render a particular model:: - - {% embed . with