code4romania / covid-19-ro-help

Platform for NGOs to create donation requests and to broadcast their services in an emergency
Mozilla Public License 2.0
18 stars 41 forks source link

Add city model and cities CSV import in the admin #366

Closed aramboi closed 4 years ago

aramboi commented 4 years ago

What does it fix?

Add a new City model that holds a list of counties, cities and if they are the county residence. Add an import page to the City admin model that allows to load the list of cities from an offical source. The country residence is determined based on a hardcoded list for now. Allow only superadmins to load the data at this time.

This is part 1 of the #327 issue as we first need to get the data loaded in the live enviornment before we can create a migration that will link the current NGOs to the new City model.

How has it been tested?

Used the CSV file sample provided by @catileptic