module documentation

Misc. utility functions/classes for admin documentation generator.

Function create_reference_role Undocumented
Function default_reference_role Undocumented
Function get_view_name Undocumented
Function parse_docstring Parse out the parts of a docstring. Return (title, body, metadata).
Function parse_rst Convert the string from reST to an XHTML fragment.
Function remove_non_capturing_groups Find non-capturing groups in the given `pattern` and remove them, e.g. 1. (?P<a>\w+)/b/(?:\w+)c(?:\w+) => (?P<a>\\w+)/b/c 2. ^(?:\w+(?:\w+))a => ^a 3. ^a(?:\w+)/b(?:\w+) => ^a/b
Function replace_metacharacters Remove unescaped metacharacters from the pattern.
Function replace_named_groups Find named groups in `pattern` and replace them with the group name. E.g., 1. ^(?P<a>\w+)/b/(\w+)$ ==> ^<a>/b/(\w+)$ 2. ^(?P<a>\w+)/b/(?P<c>\w+)/$ ==> ^<a>/b/<c>/$ 3. ^(?P<a>\w+)/b/(\w+) ==> ^<a>/b/(\w+) 4...
Function replace_unnamed_groups Find unnamed groups in `pattern` and replace them with '<var>'. E.g., 1. ^(?P<a>\w+)/b/(\w+)$ ==> ^(?P<a>\w+)/b/<var>$ 2. ^(?P<a>\w+)/b/((x|y)\w+)$ ==> ^(?P<a>\w+)/b/<var>$ 3. ^(?P<a>\w+)/b/(\w+) ==> ^(...
Constant ROLES Undocumented
Variable named_group_matcher Undocumented
Variable non_capturing_group_matcher Undocumented
Variable unnamed_group_matcher Undocumented
Function _find_groups Undocumented
Function _get_group_start_end Undocumented
def create_reference_role(rolename, urlbase): (source)

Undocumented

def default_reference_role(name, rawtext, text, lineno, inliner, options=None, content=None): (source)

Undocumented

def get_view_name(view_func): (source)

Undocumented

def parse_docstring(docstring): (source)

Parse out the parts of a docstring. Return (title, body, metadata).

def parse_rst(text, default_reference_context, thing_being_parsed=None): (source)

Convert the string from reST to an XHTML fragment.

def remove_non_capturing_groups(pattern): (source)

Find non-capturing groups in the given `pattern` and remove them, e.g. 1. (?P<a>\w+)/b/(?:\w+)c(?:\w+) => (?P<a>\\w+)/b/c 2. ^(?:\w+(?:\w+))a => ^a 3. ^a(?:\w+)/b(?:\w+) => ^a/b

def replace_metacharacters(pattern): (source)

Remove unescaped metacharacters from the pattern.

def replace_named_groups(pattern): (source)

Find named groups in `pattern` and replace them with the group name. E.g., 1. ^(?P<a>\w+)/b/(\w+)$ ==> ^<a>/b/(\w+)$ 2. ^(?P<a>\w+)/b/(?P<c>\w+)/$ ==> ^<a>/b/<c>/$ 3. ^(?P<a>\w+)/b/(\w+) ==> ^<a>/b/(\w+) 4. ^(?P<a>\w+)/b/(?P<c>\w+) ==> ^<a>/b/<c>

def replace_unnamed_groups(pattern): (source)

Find unnamed groups in `pattern` and replace them with '<var>'. E.g., 1. ^(?P<a>\w+)/b/(\w+)$ ==> ^(?P<a>\w+)/b/<var>$ 2. ^(?P<a>\w+)/b/((x|y)\w+)$ ==> ^(?P<a>\w+)/b/<var>$ 3. ^(?P<a>\w+)/b/(\w+) ==> ^(?P<a>\w+)/b/<var> 4. ^(?P<a>\w+)/b/((x|y)\w+) ==> ^(?P<a>\w+)/b/<var>

Undocumented

Value
{'model': '%s/models/%s/',
 'view': '%s/views/%s/',
 'template': '%s/templates/%s/',
 'filter': '%s/filters/#%s',
 'tag': '%s/tags/#%s'}
named_group_matcher = (source)

Undocumented

non_capturing_group_matcher = (source)

Undocumented

unnamed_group_matcher = (source)

Undocumented

def _find_groups(pattern, group_matcher): (source)

Undocumented

def _get_group_start_end(start, end, pattern): (source)

Undocumented