# HG changeset patch # User Jeff Hammel # Date 1471833960 25200 # Node ID 21273cdb20476c8e203e017d2e7750df012a021c # Parent c0f6a87d4dd84e4a2c72d9b7b84faae86d5b1ef5 minor polish diff -r c0f6a87d4dd8 -r 21273cdb2047 decoupage.ini --- a/decoupage.ini Sun Aug 21 19:39:18 2016 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -#!/usr/bin/env paster - -[DEFAULT] -debug = true -email_to = k0scist@gmail.com -smtp_server = localhost -error_email_from = paste@localhost - -[server:main] -use = egg:Paste#http -host = 0.0.0.0 -port = 5150 - -[composite:main] -use = egg:Paste#urlmap -/ = decoupage - -set debug = false - -[app:decoupage] -paste.app_factory = decoupage.factory:factory -decoupage.directory = %(here)s/example -decoupage.configuration = %(here)s/example.ini -decoupage.auto_reload = True \ No newline at end of file diff -r c0f6a87d4dd8 -r 21273cdb2047 decoupage/web.py --- a/decoupage/web.py Sun Aug 21 19:39:18 2016 -0700 +++ b/decoupage/web.py Sun Aug 21 19:46:00 2016 -0700 @@ -35,6 +35,7 @@ transformers = transformers() string = (str, unicode) + class Decoupage(object): ### class level variables @@ -120,6 +121,7 @@ ### methods dealing with HTTP def __call__(self, environ, start_response): + """WSGI application""" # boilerplate: request and filename request = Request(environ) @@ -181,7 +183,7 @@ ### build data dictionary # TODO: separate these out into several formatters files = self.filedata(path, directory, conf) - data = {'path': path, 'files': files, 'request': request } + data = {'path': path, 'files': files, 'request': request} # add a function to get the path to files data['filepath'] = lambda *segments: os.path.join(*([directory] + list(segments))) diff -r c0f6a87d4dd8 -r 21273cdb2047 paster-serve.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paster-serve.ini Sun Aug 21 19:46:00 2016 -0700 @@ -0,0 +1,24 @@ +#!/usr/bin/env paster + +[DEFAULT] +debug = true +email_to = k0scist@gmail.com +smtp_server = localhost +error_email_from = paste@localhost + +[server:main] +use = egg:Paste#http +host = 0.0.0.0 +port = 5150 + +[composite:main] +use = egg:Paste#urlmap +/ = decoupage + +set debug = false + +[app:decoupage] +paste.app_factory = decoupage.factory:factory +decoupage.directory = %(here)s/example +decoupage.configuration = %(here)s/example.ini +decoupage.auto_reload = True \ No newline at end of file