def setup_model(): #import camelot.model from elixir import setup_all import model setup_all(create_tables=True) from camelot.model.authentication import updateLastLogin updateLastLogin()
def setup_model(): import camelot.model import example.model from elixir import setup_all from camelot.model.authentication import updateLastLogin setup_all(create_tables=True) updateLastLogin()
def setup_model(): import camelot.model from elixir import setup_all import model setup_all(create_tables=True) from camelot.model.authentication import updateLastLogin updateLastLogin()
def setup_model(): #import camelot.model from elixir import setup_all import model print 'Testing...' print 'model.metadata: ', model.__metadata__ setup_all(create_tables=False) print 'Original Tables:' # for table in model.__metadata__.sorted_tables: # print str(table) tables_to_drop = ([ 'address', # 'authentication_mechanism', # 'authentication_mechanism_username', 'batch_job', 'batch_job_type', 'contact_mechanism', 'fixture', 'fixture_version', 'geographic_boundary', 'geographic_boundary_city', 'geographic_boundary_country', 'memento', 'memento_create', 'memento_delete', 'memento_update', 'organization', 'party', 'party_address', 'party_address_role_type', 'party_authentication', 'party_contact_mechanism', 'party_relationship', 'party_relationship_dir', 'party_relationship_empl', 'party_relationship_shares', 'party_relationship_suppl', 'party_representor', 'party_status', 'party_status_type', 'person', 'synchronizedable', 'synchronized', 'synchronizedable_to_synchronized', # 'translation', ]) for table in model.__metadata__.sorted_tables: if str(table) in tables_to_drop: model.__metadata__.remove(table) setup_all(create_tables=True) # print # print 'Reduced Tables' # for table in model.__metadata__.sorted_tables: # print str(table) from camelot.model.authentication import updateLastLogin updateLastLogin()
def setup_model(): """This function will be called at application startup, it is used to setup the model""" import camelot.model from elixir import setup_all import model # # dummy logging statement to prevent pyflakes warnings for # unused imports # logger.debug('loaded model from %s' % (camelot.model.__name__)) logger.debug('loaded model from %s' % (model.__name__)) setup_all(create_tables=True) from camelot.model.authentication import updateLastLogin updateLastLogin()
def setup_model(): """This function will be called at application startup, it is used to setup the model""" import camelot.model from elixir import setup_all import model # # dummy logging statement to prevent pyflakes warnings for # unused imports # logger.debug('loaded model from %s'%(camelot.model.__name__)) logger.debug('loaded model from %s'%(model.__name__)) setup_all(create_tables=True) from camelot.model.authentication import updateLastLogin updateLastLogin()
def setup_model(): import camelot.model import model from elixir import setup_all setup_all(create_tables=True) from camelot.model.authentication import updateLastLogin updateLastLogin() # # Load sample data with the fixure mechanism # from fixtures import load_movie_fixtures load_movie_fixtures() # # setup the views # from view import setup_views setup_views()