Moved the wrfeed module to its own location in the repository to enable independent...
[philipp/winterrodeln/wrfeed.git] / wrfeed / websetup.py
1 """Setup the wrfeed application"""
2 import logging
3
4 import pylons.test
5
6 from wrfeed.config.environment import load_environment
7 from wrfeed.model.meta import Session, metadata
8
9 log = logging.getLogger(__name__)
10
11 def setup_app(command, conf, vars):
12     """Place any commands to setup wrfeed here"""
13     # Don't reload the app if it was loaded under the testing environment
14     if not pylons.test.pylonsapp:
15         load_environment(conf.global_conf, conf.local_conf)
16
17     # Create the tables if they don't already exist
18     metadata.create_all(bind=Session.bind)