def add_location(self, latitude, longitude, name, location_type=None, picture=None, description=None, safety=None, ease_of_use=None, capacity_type=None): """ Adds a new Location object to the database Returns the newly created Location object """ new_location = Location() new_location.latitude = latitude new_location.longitude = longitude new_location.name = name new_location.location_type = location_type new_location.picture = picture new_location.description = description new_location.safety = safety new_location.ease_of_use = ease_of_use new_location.capacity_type = capacity_type new_location.save() return new_location