2024-02-06
Goal
Install django-import-export and bulk upload some data. I shouldn't have to upload all of these things if I keep them organized well enough.
Notes
I started today by pushing my Cosmetic
changes to the HitHub App to the HitHub GitHub. Then I installed django-import-export via the django-import-export docs.
pip install django-import-export
Then added it to my INSTALLED_APPS
list in my hithub/settings.py
:
INSTALLED_APPS = (
...
'import_export',
)
And finally needed to collect Static Files via
python manage.py collectstatic
Then I wanted to add the functionality to add Django Bulk Uploads to the Django Admin view so I followed the Admin Integration Documentation . When I asked ChatGPT about how to integrate it, I learned that I needed to create a django-import-export Resource for Django Models that I want to upload. For this I needed to create a resources.py
file to hold resources for each of my different models.
Currently this might be difficult to implement for my Django ImageField, so I may just start out by doing it for my SpiritFighter
data. I should also definitely update my SpiritFighter
data.
Results
- Installed django-import-export
- Learned about the django-import-export Resource
Next Time
- Actually implement the django-import-export Resource.