Subversion Repositories SmartDukaan

Rev

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

Rev 16305 Rev 16372
Line 392... Line 392...
392
    state = Field(String(48))
392
    state = Field(String(48))
393
    source = Field(Enum('retailer_crm_edited', 'retailer_master', 'fos_crm', 'user_profile'))
393
    source = Field(Enum('retailer_crm_edited', 'retailer_master', 'fos_crm', 'user_profile'))
394
    created = Field(DateTime,default=func.now()) 
394
    created = Field(DateTime,default=func.now()) 
395
    using_options(shortnames=True)
395
    using_options(shortnames=True)
396
    using_table_options(mysql_engine="InnoDB")
396
    using_table_options(mysql_engine="InnoDB")
-
 
397
 
-
 
398
class user_filters(Entity):
-
 
399
    id = Field(Integer, primary_key= True)
-
 
400
    user_id =  Field(Integer(unsigned=True))
-
 
401
    type=Field(Enum('clear','brand'))
-
 
402
    filters = Field(String(256))
-
 
403
    using_options(shortnames=True)
-
 
404
    using_table_options(mysql_engine="InnoDB")
397
    
405
    
398
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
406
def initialize(dbname='dtr', db_hostname="localhost", echo=True):
399
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
407
    #metadata.bind = "sqlite:///inventory-new.sqlite" #need to read it from configserver.
400
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
408
    #metadata.bind = 'mysql://root:shop2020@localhost/catalog'
401
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)
409
    cengine = create_engine('mysql://root:shop2020@' + db_hostname + '/' + dbname, pool_recycle=7200)