2008-12-03 19:41:18 +01:00
|
|
|
"""Quixote
|
2006-03-16 01:58:21 +01:00
|
|
|
|
2008-12-03 19:41:18 +01:00
|
|
|
A small and flexible Python web application framework.
|
2006-03-16 01:58:21 +01:00
|
|
|
"""
|
|
|
|
|
2016-03-24 23:25:53 +01:00
|
|
|
__version__ = '3.0'
|
2006-03-16 01:58:21 +01:00
|
|
|
|
|
|
|
# These are frequently needed by Quixote applications.
|
|
|
|
from quixote.publish import \
|
|
|
|
get_publisher, get_request, get_response, get_path, redirect, \
|
2007-01-30 16:25:26 +01:00
|
|
|
get_session, get_session_manager, get_user, get_field, get_cookie, \
|
2012-11-23 17:33:53 +01:00
|
|
|
get_wsgi_app, cleanup, get_param
|
2006-03-16 01:58:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
# This is the default charset used by the HTTPRequest, HTTPResponse,
|
|
|
|
# DefaultLogger, and sendmail components.
|
2008-12-03 19:41:18 +01:00
|
|
|
DEFAULT_CHARSET = 'utf-8'
|
2006-03-16 01:58:21 +01:00
|
|
|
|
|
|
|
def enable_ptl():
|
|
|
|
"""
|
|
|
|
Installs the import hooks needed to import PTL modules. This must
|
|
|
|
be done explicitly because not all Quixote applications need to use
|
|
|
|
PTL, and import hooks are deep magic that can cause all sorts of
|
|
|
|
mischief and deeply confuse innocent bystanders. Thus, we avoid
|
|
|
|
invoking them behind the programmer's back. One known problem is
|
|
|
|
that, if you use ZODB, you must import ZODB before calling this
|
|
|
|
function.
|
|
|
|
"""
|
|
|
|
import quixote.ptl.install
|