Cmastris / django_photo_gallery

A photo gallery website built using Django 4 and Bootstrap 5.
https://cmastris.eu.pythonanywhere.com/
MIT License
2 stars 8 forks source link

FEATURE REQUEST: Upload multiple photos #1

Open addohm opened 1 year ago

addohm commented 1 year ago

Uploading one photo at a time just isn't feasible.

Cmastris commented 1 year ago

Hi @addohm, thanks for raising this. I'm afraid I'm not actively developing or supporting this project beyond significant bugs (it was primarily built as a portfolio project). However, you're welcome to fork and modify it if you like.

Having said that, it should be possible to bulk upload/populate model data (i.e. photo files and their associated info) programatically. My memory is a little hazy, so I'd recommend taking a look through Django's documentation:

https://docs.djangoproject.com/en/4.1/howto/initial-data/ https://docs.djangoproject.com/en/4.1/topics/migrations/#data-migrations https://docs.djangoproject.com/en/4.1/ref/models/querysets/#bulk-create

You can also see how I programmatically created (mock) file uploads here: https://github.com/Cmastris/django_photo_gallery/blob/main/photo_gallery/photos/tests.py

Hope that helps!