Home | Trees | Indices | Help |
|
---|
|
Miscellaneous utility functions.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
log = logging.getLogger('spammcan.controllers')
|
|||
_static_dir = None
|
|
Returns absolute URL (including schema and host to this server). Tries to account for 'Host' header and reverse proxing ('X-Forwarded-Host'). |
Add custom global template variables. Adds the following variables: ``tg.motd`` - The message of the day as a plain string |
Return id of current visitor. This will be a string with 32-char MD5 hash, which will be retrieved either from a request cookie or default to the visit_key of the current identity. As a side affect this function sets a response cookie for the user ID called 'spammcan_uid' with an expiry time set by the 'spammcan.uid_cookie_expiry' config setting (defaults to 90 days). |
Return name of the server this application runs on. Tries to account for 'Host' header and reverse proxing. |
Try to convert text into HTML with docutils. If conversion fails or using docutils is turned off by the configuration, return text wrapped in a PRE element with CSS class "plaintext". |
Wrap each paragraph in s with wrap(). Returns 2-item tuple with a list of line nummers of continuation lines, and the wrapped text. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Nov 18 21:35:02 2008 | http://epydoc.sourceforge.net |