__revision__ = "$Id: configuration.py 1098 2008-10-19 08:00:03Z mario $"
from os.path import join, dirname
import gz.gizmo
configuration = dict(
durus_address=('127.0.0.1', 6075),
http_address=('', 8075),
live_host='ks39074.kimsufi.com', # from socket import getfqdn; getfqdn()
webmaster_address='info@gizmojo.org',
is_email_enabled=True,
display_exceptions=True,
secure=False,
doctype='XHTML_10_Transitional',
robotstxt='User-agent: *\nDisallow: /\n',
static_cache_time=60,
# SiteRoot-relative URL Paths, by name :
# - The basekey parameter of Publisher.get_url_path_for(basekey, filename)
# must be one of the keys of this dictionary.
# - Actual path value used at runtime is
# common.script_name_path(url_paths[name]), i.e. as returned by
# Publisher.get_url_path_for(name).
# - The value for url_paths[None] determines behaviour of
# Publisher.get_url_path_for(None).
url_paths = {
None: None,
'assets': '/assets/',
'gza': '/gza/',
'login': '/login/',
'logout': '/login/logout',
'register': '/register/',
},
# File System paths, by name :
# - The basekey parameter of Publisher.get_file_path_for(basekey, filename)
# must be one of the keys of this dictionary.
# - Values must be absolute, or relative to site.get_package_directory().
# - The value for file_paths[None] determines behaviour of
# Publisher.get_file_path_for(None).
file_paths = {
None: dirname(__file__),
'demo': dirname(__file__), # evoque template collection
'gz': dirname(gz.__file__), # evoque template collection
'favicon': 'static/favicon.png',
'assets': 'static',
'gza': join(dirname(gz.gizmo.__file__), 'assets'),
'pages': 'pages', # evoque template collection
'templates': 'templates', # evoque default template collection
},
# Used by User Admin facility, gz.fill.admin_users
permissions=[
'administrator',
],
realms=[
'gzdemo', # [0] is default realm
],
)
'''
If Publisher.is_live_host(), then the Site configuration is (recursively)
updated from the following dict, i.e. attributes that are dicts are also
respectively updated (not overwritten).
'''
configuration_live = dict(
scgi_address=('127.0.0.1', 7075),
# Uncomment line below to cuase redirect of all pages requiring login to https
#https_address=('demo.gizmojo.org', 443),
max_children=2,
# False => error page response is delegated to Publisher.hide_exception()
display_exceptions=False,
# True => will cause redirect to https on requests to pages that should
# only be served encrypted (such as login page) -- if https is available.
secure=True,
# Allow robots full access on live site
robotstxt='User-agent: *\nDisallow: \n',
# Cache time for static files
static_cache_time=6000,
)