Subversion Repositories SmartDukaan

Rev

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

Rev 15133 Rev 15135
Line 155... Line 155...
155
    is_activated = Field(Boolean)
155
    is_activated = Field(Boolean)
156
    activated = Field(DateTime,onupdate=func.now())
156
    activated = Field(DateTime,onupdate=func.now())
157
    created = Field(DateTime,default=func.now())
157
    created = Field(DateTime,default=func.now())
158
    using_options(shortnames=True)
158
    using_options(shortnames=True)
159
    using_table_options(mysql_engine="InnoDB")
159
    using_table_options(mysql_engine="InnoDB")
-
 
160
    
-
 
161
class Activation_Codes(Entity):
-
 
162
    code = Field(String(10))
-
 
163
    created = Field(DateTime, defalut=func.now())
160
 
164
 
161
 
165
 
162
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
166
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
163
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
167
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
164
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
168
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'