Package django :: Package contrib :: Package admin :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Misc. utility functions/classes for admin documentation generator.

Functions [hide private]
 
trim_docstring(docstring)
Uniformly trims leading/trailing whitespace from docstrings.
source code
 
parse_docstring(docstring)
Parse out the parts of a docstring.
source code
 
parse_rst(text, default_reference_context, thing_being_parsed=None, link_base='../..')
Convert the string from reST to an XHTML fragment.
source code
 
create_reference_role(rolename, urlbase) source code
 
default_reference_role(name, rawtext, text, lineno, inliner, options=None, content=None) source code
Variables [hide private]
  docutils_is_available = False
  ROLES = {'filter': '%s/filters/#%s', 'model': '%s/models/%s/',...
Function Details [hide private]

trim_docstring(docstring)

source code 

Uniformly trims leading/trailing whitespace from docstrings.

Based on http://www.python.org/peps/pep-0257.html#handling-docstring-indentation

parse_docstring(docstring)

source code 

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


Variables Details [hide private]

ROLES

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