Example project to show how to use Python to generate excel template to bulk import data.
pip install -r requirements.txt
### Create your Database
createuser python_excel
psql -c "CREATE DATABASE python_excel WITH OWNER python_excel ENCODING 'UTF8'"
This assumes you're using PostgreSQL for your DB. This technique should work for other databases but you'll have to edit the settings.
### Run Migrations
cd python_excel
python manage.py migrate
I've added a data migration to populate the job titles and one member of staff.
cd python_excel
python manage.py createsuperuser
## Create Excel File
cd python_excel
python manage.py generate_excel_file
cd python_excel
python manage.py import_excel_file staff_populated.xlsx
Start the server with python manage.py runserver
you can then go to http://127.0.0.1:8000/admin/staff/staff/ login and you should see the newly created users.