def setup_model( self ): """This function will be called at application startup, it is used to setup the model""" from camelot.core.sql import metadata from camelot.core.orm import setup_all metadata.bind = self.ENGINE() import camelot.model.authentication import camelot.model.i18n import camelot.model.memento import cobranza.model setup_all() metadata.create_all()
def setup_model( self ): from camelot.core.sql import metadata metadata.bind = self.ENGINE() from camelot.model import authentication from camelot.model import party from camelot.model import i18n from camelot.model import memento from camelot.model import fixture from camelot.model import batch_job import camelot_example.model from camelot_example.view import setup_views from camelot_example.fixtures import load_movie_fixtures from camelot.model.authentication import update_last_login from camelot.core.orm import setup_all setup_all(create_tables=True) setup_views() load_movie_fixtures() update_last_login()
def setup_model(self): from camelot.core.sql import metadata metadata.bind = self.ENGINE() from camelot.model import authentication from camelot.model import party from camelot.model import i18n from camelot.model import memento from camelot.model import fixture from camelot.model import batch_job import camelot_example.model from camelot_example.view import setup_views from camelot_example.fixtures import load_movie_fixtures from camelot.model.authentication import update_last_login from camelot.core.orm import setup_all setup_all(create_tables=True) setup_views() load_movie_fixtures() update_last_login()
def setup_model( self ): from camelot.core.sql import metadata # bind metadata to a specific connection, when using the in memory # database this is needed or the data is lost metadata.bind = self.ENGINE().connect() from camelot.model import authentication from camelot.model import party from camelot.model import i18n from camelot.model import memento from camelot.model import fixture from camelot.model import batch_job import camelot_example.model from camelot_example.view import setup_views from camelot_example.fixtures import load_movie_fixtures from camelot.model.authentication import update_last_login from camelot.core.orm import setup_all setup_all(create_tables=True) setup_views() load_movie_fixtures() update_last_login()