Subversion Repositories SmartDukaan

Rev

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

Rev 15011 Rev 15048
Line 106... Line 106...
106
    dealerUrl=Field(String(256))
106
    dealerUrl=Field(String(256))
107
    paginatedUrl=Field(String(256))
107
    paginatedUrl=Field(String(256))
108
    rawhtml = Field(Text)
108
    rawhtml = Field(Text)
109
    using_options(shortnames=True)
109
    using_options(shortnames=True)
110
    using_table_options(mysql_engine="InnoDB")
110
    using_table_options(mysql_engine="InnoDB")
-
 
111
 
-
 
112
class Orders(Entity):
-
 
113
    id = Field(Integer(unsigned=True), primary_key=True)
-
 
114
    user_id = Field(Integer(unsigned=True), primary_key=True)
-
 
115
    store_id = Field(Integer(unsigned=True), primary_key=True)
-
 
116
    order_url = Field(String(256))
-
 
117
    status = Field(String(32))
111
        
118
    created = Field(DateTime)
-
 
119
    modified = Field(DateTime)
-
 
120
    using_options(shortnames=True)
-
 
121
    using_table_options(mysql_engine="InnoDB")
112
 
122
 
113
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
123
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
114
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
124
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
115
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
125
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
116
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
126
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)