diff --git a/cms/__init__.py b/cms/__init__.py index 41450bb..e1df8c6 100644 --- a/cms/__init__.py +++ b/cms/__init__.py @@ -45,16 +45,19 @@ class components : _submenu[_index] = _item _index += 1 return _object - def html(uri,id,_args=None) : + def html(uri,id,_args={}) : """ This function reads a given uri and returns the appropriate html document, and applies environment context """ _html = (open(uri)).read() + + #return ' '.join(['
'.replace(':id',id),_html,'
']) _html = ' '.join(['
'.replace(':id',id),_html,'
']) appContext = Environment(loader=BaseLoader()).from_string(_html) return appContext.render(**_args) + # return _html def data (_args): """ :store data-store parameters (data-transport, github.com/lnyemba/data-transport)