Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Adds the ability to disable morepath autoconfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krienbühl committed Jun 25, 2015
1 parent 7474fa9 commit 55e79cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions HISTORY.rst
Expand Up @@ -4,6 +4,9 @@ Changelog
Unreleased
~~~~~~~~~~

- Adds the ability to disable morepath autoconfig.
[href]

- Pressing Ctrl+T in the onegov-server cli will now show a memory summary. This
is helpful for determening if there are memory leaks or not.
[href]
Expand Down
8 changes: 6 additions & 2 deletions onegov/server/core.py
Expand Up @@ -63,15 +63,19 @@ class Server(object):
server automatically configures morepath for the applications that depend
on it.
If morepath autoconfig is not desired, set ``configure_morepath`` to False.
"""

def __init__(self, config):
def __init__(self, config, configure_morepath=True):
self.applications = ApplicationCollection(config.applications)
self.wildcard_applications = set(
a.root for a in config.applications if not a.is_static)

self.configure_logging(config.logging)
self.configure_morepath()

if configure_morepath:
self.configure_morepath()

def configure_logging(self, config):
""" Configures the python logging.
Expand Down

0 comments on commit 55e79cd

Please sign in to comment.