Ejemplo n.º 1
0
        "PROP_DescripcionGeneral")] + ' ' + row[
            cnames.index("PROP_DireccionOtros"
                         )]  # db.StringProperty() #prop_descripciongeneral

    #print type(row[cnames.index("PROP_PROV_Id")])

    prop.country = u'Argentina'  # Argentina
    prop.state = row[cnames.index("PROP_PROV_Id")]  # PRop_prov_id
    prop.city = row[cnames.index("PROP_LOCAL_Id")]  # prov local id
    prop.neighborhood = row[cnames.index("PROP_barrio")]
    prop.street_name = row[cnames.index("PROP_Calle")]
    prop.street_number = int(tryint(row[cnames.index("PROP_Nro")]))
    prop.zip_code = ''  # db.IntegerProperty()

    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() #
Ejemplo n.º 2
0
 for j in range(gridy): 
   prop = Property()
   
   prop.headline                = '' # db.StringProperty()
   prop.main_description        = '_main_description_' # db.StringProperty()
   
   prop.country                 = 'Argentina'
   prop.state                   = 'CABA'
   prop.city                    = 'Buenos Aires'
   prop.neighborhood            = 'Barrio %s' % str(seed) 
   prop.street_name             = 'Calle ' + str(seed)
   prop.street_number           = seed
   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()