Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
172 ashish 1
# -*- coding: utf-8 -*-
2
"""Setup the Wiki-20 application"""
3
 
4
import logging
5
 
6
import transaction
7
from tg import config
8
 
9
from wiki20.config.environment import load_environment
10
 
11
__all__ = ['setup_app']
12
 
13
log = logging.getLogger(__name__)
14
 
15
 
16
def setup_app(command, conf, vars):
17
    """Place any commands to setup wiki20 here"""
18
    load_environment(conf.global_conf, conf.local_conf)
19
    # Load the models
20
    from wiki20 import model
21
    print "Creating tables"
22
    model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)
23
 
24
 
25
    transaction.commit()
26
    print "Successfully setup"