mirror of
https://github.com/kennethreitz-archive/pystache.git
synced 2026-06-05 23:40:16 +00:00
additional docstrings
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
pystache.core
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
This module provides the main entrance point to Pystache.
|
||||
"""
|
||||
|
||||
|
||||
from .template import Template
|
||||
from .view import View
|
||||
from .loader import Loader
|
||||
|
||||
|
||||
__all__ = ['Template', 'View', 'Loader', 'render']
|
||||
|
||||
|
||||
def render(template, context=None, **kwargs):
|
||||
"""Renders a template string against the given context."""
|
||||
|
||||
context = context and context.copy() or {}
|
||||
context.update(kwargs)
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
pystache.template
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
This module provides Pystache's Template class.
|
||||
"""
|
||||
|
||||
import re
|
||||
import cgi
|
||||
import collections
|
||||
@@ -15,6 +22,7 @@ except ImportError:
|
||||
literal = unicode
|
||||
|
||||
|
||||
|
||||
class Modifiers(dict):
|
||||
"""Dictionary with a decorator for assigning functions to keys."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user