def generate_fake_facilities(names=('Wilson Elementary',)):
 facilities = []
 for name in names:
  found_facilities = Facility.objects.filter(name=name)
  if found_facilities:
   facility = found_facilities[0]
   logging.info(("Retrieved facility '%s'" % name))
  else:
   facility = Facility(name=name)
   facility.save()
   logging.info(("Created facility '%s'" % name))
  facilities.append(facility)
 return facilities

def generate_fake_facilities ( names = ( 'Wilson Elementary' , ) ) : facilities = [ ] for name in names : found_facilities = Facility . objects . filter ( name = name ) if found_facilities : facility = found_facilities [ 0 ] logging . info ( ( "Retrieved facility '%s'" % name ) ) else : facility = Facility ( name = name ) facility . save ( ) logging . info ( ( "Created facility '%s'" % name ) ) facilities . append ( facility ) return facilities
add the given fake facilities .