def handle(self, *args, **options): quantity = options['qtd'] for i in range(1, quantity): occurrence = Occurrence() occurrence.date_time = get_date() occurrence.fact = get_stop_fact() occurrence.location = random_stop_position() occurrence.route = get_route() occurrence.comment = random_comment() occurrence.photo = random_photo() occurrence.save()