Subversion Repositories SmartDukaan

Rev

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

Rev 1130 Rev 1131
Line 1... Line 1...
1
'''
1
'''
2
Created on 26-Aug-2010
2
Created on 26-Aug-2010
3
 
3
 
4
@author: ashish
4
@author: ashish
5
'''
5
'''
-
 
6
from sqlalchemy import create_engine
6
from elixir import *
7
from elixir import *
7
import elixir
8
import elixir
8
 
9
 
9
 
10
 
10
class PaymentGateway(Entity):
11
class PaymentGateway(Entity):
Line 57... Line 58...
57
    using_options(shortnames=True)
58
    using_options(shortnames=True)
58
    using_table_options(mysql_engine="InnoDB")
59
    using_table_options(mysql_engine="InnoDB")
59
 
60
 
60
def initialize():
61
def initialize():
61
    #metadata.bind = "sqlite:///payment.sqlite" #need to read it from configserver.
62
    #metadata.bind = "sqlite:///payment.sqlite" #need to read it from configserver.
62
    metadata.bind = 'mysql://root:shop2020@localhost/payment'
63
    engine = create_engine('mysql://root:shop2020@localhost/payment', pool_recycle=7200)
-
 
64
    metadata.bind = engine
63
    metadata.bind.echo = True
65
    metadata.bind.echo = True
64
    setup_all(True)
66
    setup_all(True)
65
 
67
 
66
if __name__=="__main__":
68
if __name__=="__main__":
67
    initialize()
69
    initialize()
68
70