Mercurial > hatta
changeset 2469:fa6115f52c07 1.6.6
merge
| author | Radomir Dopieralski <sheep-devel@sheep.art.pl> |
|---|---|
| date | Sat, 29 Aug 2015 03:35:48 +0200 |
| parents | 883df5b8a6fb (current diff) 860bf8d088d2 (diff) |
| children | 6b60f9a567da |
| files | examples/hatta.fcg |
| diffstat | 4 files changed, 50 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/examples/hatta.fcg Sat Aug 29 03:35:17 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -import flup -import sys -# XXX Uncomment and edit this if hatta.py is not installed in site-packages -#sys.path.insert(0, "/path/to/dir/with/hatta/") -import hatta - -config = hatta.WikiConfig( - pages_path='/path/to/pages/', # XXX Edit this! - cache_path='/path/to/cache/', # XXX Edit this! -) -config.parse_args() -config.parse_files() -config.sanitize() -wiki = hatta.Wiki(config) -app = wiki.application - -# XXX Uncomment this, if you are using fastcgi on / on Lighttpd -#def app(env, start): -# env['PATH_INFO'] = env['SCRIPT_NAME'] + env['PATH_INFO'] -# env['SCRIPT_NAME'] = '' -# return wiki.application(env, start) - -flup.server.fcgi.WSGIServer(app).run()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/hatta.fcgi Sat Aug 29 03:35:48 2015 +0200 @@ -0,0 +1,26 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import flup +import sys +# XXX Uncomment and edit this if hatta.py is not installed in site-packages +#sys.path.insert(0, "/path/to/dir/with/hatta/") +import hatta + +config = hatta.WikiConfig( + pages_path='/path/to/pages/', # XXX Edit this! + cache_path='/path/to/cache/', # XXX Edit this! +) +config.parse_args() +config.parse_files() +config.sanitize() +wiki = hatta.Wiki(config) +app = wiki.application + +# XXX Uncomment this, if you are using fastcgi on / on Lighttpd +#def app(env, start): +# env['PATH_INFO'] = env['SCRIPT_NAME'] + env['PATH_INFO'] +# env['SCRIPT_NAME'] = '' +# return wiki.application(env, start) + +flup.server.fcgi.WSGIServer(app).run()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/hatta.gzip.fcgi Sat Aug 29 03:35:48 2015 +0200 @@ -0,0 +1,22 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +from flup.server.fcgi import WSGIServer +# uses https://bitbucket.org/lcrees/wsgigzip/ +from wsgigzip.gzip import GzipMiddleware +import hatta + +config = hatta.WikiConfig( + pages_path = '/path/to/pages/', # edit this + cache_path = '/path/to/cache/', # edit this + template_path = '/path/to/templates/', # optional + pygments_style = 'autumn', # optional + subdirectories = True # optional +) + +config.parse_args() +config.parse_files() +config.sanitize() +wiki = hatta.Wiki(config) + +WSGIServer(GzipMiddleware(wiki.application)).run()
--- a/hatta/templates/layout.html Sat Aug 29 03:35:17 2015 +0200 +++ b/hatta/templates/layout.html Sat Aug 29 03:35:48 2015 +0200 @@ -12,8 +12,8 @@ {% block page_title %}{% endblock %} </div><div id="hatta-content"> {% block content %}{% endblock %} -<div id="hatta-footer"> +</div><div id="hatta-footer"> {% block footer %}{% endblock %} -</div></div> +</div> {% block scripts %}{% endblock %} </body></html>
