# HG changeset patch # User Jeff Hammel # Date 1385786720 28800 # Node ID 8596a1d97740c020cbb92575676003dd6f287d6a # Parent bb289832e0610d30f692ba7b6fc0f8a4679530a9 unicode diff -r bb289832e061 -r 8596a1d97740 decoupage/templates/head.html --- a/decoupage/templates/head.html Fri Jul 05 14:03:12 2013 -0700 +++ b/decoupage/templates/head.html Fri Nov 29 20:45:20 2013 -0800 @@ -3,6 +3,7 @@ xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="True"> + ${title or path} diff -r bb289832e061 -r 8596a1d97740 decoupage/web.py --- a/decoupage/web.py Fri Jul 05 14:03:12 2013 -0700 +++ b/decoupage/web.py Fri Nov 29 20:45:20 2013 -0800 @@ -3,7 +3,7 @@ """ # TODO: -# files like `index.ini` +# handle files with `#`s like like `#index.ini` # -> http://k0s.org/portfolio/ideas/#index.ini# # # oops. Handle it better @@ -38,7 +38,8 @@ 'directory': None, # directory to serve 'cascade': 'True', # whether to cascade configuration 'template': 'index.html', # XXX see below - 'template_directories': '' # list of directories to look for templates + 'template_directories': '', # list of directories to look for templates + 'charset': 'utf-8', # content encoding for index.html files; -> `Content-Type: text/html; charset=ISO-8859-1` } def __init__(self, **kw): @@ -103,7 +104,6 @@ auto_reload=self.auto_reload) - ### methods dealing with HTTP def __call__(self, environ, start_response): @@ -234,8 +234,13 @@ return self.fileserver(local_index) raise + # set charset if given + kw = {} + if self.charset: + kw['charset'] = self.charset + # return response - return Response(content_type='text/html', body=res) + return Response(content_type='text/html', body=res, **kw) ### internal methods diff -r bb289832e061 -r 8596a1d97740 setup.py --- a/setup.py Fri Jul 05 14:03:12 2013 -0700 +++ b/setup.py Fri Nov 29 20:45:20 2013 -0800 @@ -6,7 +6,7 @@ except IOError: description = '' -version = '0.12.1' +version = '0.12.2' setup(name='decoupage', version=version,