Subversion Repositories SmartDukaan

Rev

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

Rev 746 Rev 1131
Line 1... Line 1...
1
'''
1
'''
2
Created on 13-Sep-2010
2
Created on 13-Sep-2010
3
 
3
 
4
@author: rajveer
4
@author: rajveer
5
'''
5
'''
-
 
6
 
-
 
7
from sqlalchemy import create_engine
6
from elixir import *
8
from elixir import *
7
import datetime
9
import datetime
8
import elixir
10
import elixir
9
 
11
 
10
class Provider(Entity):
12
class Provider(Entity):
Line 75... Line 77...
75
    using_options(shortnames=True)
77
    using_options(shortnames=True)
76
    using_table_options(mysql_engine="InnoDB")
78
    using_table_options(mysql_engine="InnoDB")
77
   
79
   
78
def initialize():
80
def initialize():
79
    #metadata.bind = "sqlite:///logistics.sqlite" #need to read it from configserver.
81
    #metadata.bind = "sqlite:///logistics.sqlite" #need to read it from configserver.
80
    metadata.bind = 'mysql://root:shop2020@localhost/logistics'
82
    engine = create_engine('mysql://root:shop2020@localhost/logistics', pool_recycle=7200)
-
 
83
    metadata.bind = engine
81
    metadata.bind.echo = True
84
    metadata.bind.echo = True
82
    setup_all(True)
85
    setup_all(True)
83
 
86
 
84
if __name__=="__main__":
87
if __name__=="__main__":
85
    initialize()
88
    initialize()