Mercurial > hg > decoupage
changeset 92:c5895d87c65e
lets get these ordered
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sat, 27 Dec 2014 10:49:58 -0800 |
parents | 4a9c5cf9fec9 |
children | bdb9e39abd84 |
files | decoupage/web.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/decoupage/web.py Sat Mar 29 17:17:21 2014 -0700 +++ b/decoupage/web.py Sat Dec 27 10:49:58 2014 -0800 @@ -3,6 +3,7 @@ """ # TODO: + # handle files with `#`s like like `#index.ini` # -> http://k0s.org/portfolio/ideas/#index.ini# # @@ -10,9 +11,12 @@ # - either # is a magic hide character # - or you urlescape that guy +# OrderedDict + import os import sys +from collections import OrderedDict from contenttransformer.app import FileTypeTransformer from contenttransformer.app import transformers from datetime import datetime @@ -29,7 +33,6 @@ from webob import Request, Response, exc transformers = transformers() - string = (str, unicode) class Decoupage(object): @@ -244,7 +247,7 @@ ### internal methods def filedata(self, path, directory, conf=None): - conf = conf or {} + conf = conf or OrderedDict() files = [] # get data for files @@ -307,7 +310,7 @@ if hasattr(self, '_conf') and path_tuple in self._conf: return self._conf[path_tuple] - conf = {} + conf = OrderedDict() # local configuration ini_path = os.path.join(directory, 'index.ini')