Skip to content

Instantly share code, notes, and snippets.

@walison17
Last active December 7, 2018 19:30
Show Gist options
  • Save walison17/06ff0f79d1860ce07c391f3952a0ae7a to your computer and use it in GitHub Desktop.
Save walison17/06ff0f79d1860ce07c391f3952a0ae7a to your computer and use it in GitHub Desktop.
def populate(request):
PERSONS_ADD = (
{'cpf_cnpj': '00.000.000/3875-09','name': 'BANCO DO BRASIL S.A'},
{'cpf_cnpj': '00.000.320/6413-68','name': 'JOSE CELIO GURGEL DE CASTRO'},
{'cpf_cnpj': '00.000.885/0001-29','name': 'BRASAL BRASÍLIA SERVIÇOS AUTOMOTORES S/A'},
{'cpf_cnpj': '00.004.309/0001-50','name': 'DF VEICULOS LTDA'},
{'cpf_cnpj': '00.025.131/0001-23','name': 'RDA Com e Rep. e Imp. de Mat. Elet. S/A'}
)
objs = (Person(**attrs) for attrs in PERSONS_ADD)
Person.objects.bulk_create(objs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment