prop.floor = row[cnames.index("PROP_PisoDpto")] # db.IntegerProperty() prop.building_floors = int( row[cnames.index("PROP_Plantas")]) # db.IntegerProperty() #no prop.images_count = 0 #prop.user = '' # db.ReferenceProperty(User) # ===================================================== # # Search fields # # ===================================================== # # AREA FIELDS "PROP_SupLibre","PROP_SupCubierta","PROP_SupTotal" prop.area_indoor = int(tryint( row[cnames.index("PROP_SupCubierta")])) # db.FloatProperty() #cubierta prop.area_outdoor = int(tryint( row[cnames.index("PROP_SupLibre")])) # db.FloatProperty() # suptotal = int(tryint(row[cnames.index("PROP_SupTotal")])) if prop.area_indoor == 0 and prop.area_outdoor == 0 and suptotal != 0: prop.area_indoor = suptotal print str(prop.area_indoor) + ' ' + str( prop.area_outdoor) + ' ' + str(suptotal) # ROOMS FIELDS prop.rooms = int(tryint(row[cnames.index( "PROP_Ambientes")])) # db.IntegerProperty() @ambientos prop.bathrooms = int(tryint( row[cnames.index("PROP_Banos")])) # db.IntegerProperty() prop.bedrooms = int(tryint( row[cnames.index("PROP_Dormitorios")])) # db.IntegerProperty()
prop.zip_code = str(int(random.randint(1000, 9999))) # db.IntegerProperty() prop.floor = str(random.randint(0, 20)) # db.IntegerProperty() prop.building_floors = random.randint(0, int(prop.floor)) # db.IntegerProperty() prop.images_count = 0 #prop.user = '' # db.ReferenceProperty(User) # ===================================================== # # Search fields # # ===================================================== # # AREA FIELDS prop.area_indoor = int(random.randrange(30, 400)) # db.FloatProperty() prop.area_outdoor = int(random.randrange(30, 200)) # db.FloatProperty() # ROOMS FIELDS prop.rooms = int(random.randint(1, 10)) # db.IntegerProperty() prop.bathrooms = int(random.randint(1, 5)) # db.IntegerProperty() prop.bedrooms = int(random.randint(1, 7)) # db.IntegerProperty() # AMENITIES FIELDS GROUP 1 prop.appurtenance = int(random.randint(0, 1)) # db.IntegerProperty() prop.balcony = int(random.randint(0, 1)) # db.IntegerProperty() prop.doorman = int(random.randint(0, 1)) # db.IntegerProperty() prop.elevator = int(random.randint(0, 1)) # db.IntegerProperty() prop.fireplace = int(random.randint(0, 1)) # db.IntegerProperty() prop.furnished = int(random.randint(0, 1)) # db.IntegerProperty() prop.garage = int(random.randint(0, 1)) # db.IntegerProperty()