load_app can now work with no config param passed in

This commit is contained in:
Alfredo Deza
2013-01-23 18:31:02 -05:00
parent 38f4521a81
commit 4fd1d4b09f

View File

@@ -133,13 +133,15 @@ def render(template, namespace):
return state.app.render(template, namespace)
def load_app(config):
def load_app(config=None):
'''
Used to load a ``Pecan`` application and its environment based on passed
configuration.
:param config: Can be a dictionary containing configuration, or a string
which represents a (relative) configuration filename.
:param config: Can be a dictionary containing configuration, a string which
represents a (relative) configuration filename or ``None``
which will fallback to get the ``PECAN_CONFIG`` env
variable.
returns a pecan.Pecan object
'''