Quick and dirty implementation of drf endpoint to import excel/csv data from an react app.
python -m venv ./venv
source venv/bin/activate
pip install -r requirements.txt
cd frontend && npm install
Execute
python manage.py migrate in backend folder
Execute python manage.py createsuperuser in backend folder and follow instructions
Execute python manage.py runserver in backend folder
Execute npm start in frontend folder
You can reach frontend via brownser on localhost:3000 and the django admin panel on localhost:8000/admin to inspect uploaded data.
In folder backend/excel_import/tests you can find example csv/excel file. The file must have two columns named column_a and column_b:
| column_a | column_b |
|---|---|
| some chars | some other chars |
| and so | on |