Subversion Repositories SmartDukaan

Rev

Rev 1225 | Rev 1261 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1225 Rev 1249
Line 17... Line 17...
17
 
17
 
18
#===============================================================================
18
#===============================================================================
19
# Different entities in the model
19
# Different entities in the model
20
#===============================================================================
20
#===============================================================================
21
 
21
 
22
def initialize():
22
def initialize(dbname='transaction'):
23
    #metadata.bind = "sqlite:///Transactionsnew.sqlite"
23
    #metadata.bind = "sqlite:///Transactionsnew.sqlite"
24
    #metadata.bind = 'mysql://root:shop2020@localhost/transaction'
24
    #metadata.bind = 'mysql://root:shop2020@localhost/transaction'
25
    engine = create_engine('mysql://root:shop2020@localhost/transaction', pool_recycle=7200)
25
    engine = create_engine('mysql://root:shop2020@localhost/' + dbname, pool_recycle=7200)
26
    metadata.bind = engine
26
    metadata.bind = engine
27
    metadata.bind.echo = True
27
    metadata.bind.echo = True
28
    setup_all(True)
28
    setup_all(True)
29
 
29
 
30
 
30