Zine

open source content publishing system


source: servers/zine.cgi @ 1370:3011b4ea01c8

Revision 1370:3011b4ea01c8, 1.6 KB checked in by Mike Crute <mcrute@…>, 2 years ago (diff)

Updating documentation to reflect python2.5 as a requirement

Line 
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3"""
4    Zine CGI Runner
5    ~~~~~~~~~~~~~~~
6
7    Run Zine as CGI. Requires python 2.5 with
8    the wsgiref module installed.  For help con configuration
9    have a look at the README file.
10
11    :copyright: (c) 2010 by the Zine Team, see AUTHORS for more details.
12    :license: BSD, see LICENSE for more details.
13"""
14
15# path to the instance. the folder for the instance must exist,
16# if there is not instance information in that folder the websetup
17# will show an assistent
18INSTANCE_FOLDER = '/path/to/instance/folder'
19
20# path to the Zine application code.
21ZINE_LIB = '/usr/lib/zine'
22
23# these values can be use to override database pool settings.
24# see deployment guide for more details.
25POOL_SIZE = None
26POOL_RECYCLE = None
27POOL_TIMEOUT = None
28
29# if you are proxying into zine somehow (caching proxies or external
30# fastcgi servers) set this value to True to enable proxy support.  Do
31# not set this to True if you are not using proxies as this would be a
32# security risk.
33BEHIND_PROXY = None
34
35# enable this to enable an internal CGI debugging feature.
36CGI_DEBUG = False
37
38
39# ----------------------------------------------------------------------------
40# here you can further configure the wsgi app settings but usually you don't
41# have to touch them
42if CGI_DEBUG:
43    import cgitb
44    cgitb.enable()
45
46import sys
47sys.path.insert(0, ZINE_LIB)
48
49from zine import get_wsgi_app, override_environ_config
50from wsgiref.handlers import CGIHandler
51override_environ_config(POOL_SIZE, POOL_RECYCLE, POOL_TIMEOUT, BEHIND_PROXY)
52app = get_wsgi_app(INSTANCE_FOLDER)
53
54if __name__ == '__main__':
55    CGIHandler().run(app)
Note: See TracBrowser for help on using the repository browser.