I use an image gallery app on my website. At present I drop image files in a directory, and write img html tags for each image manually. Is it possible to make django create a list of files in the directory automatically, and send the json output to the gallery app, so that I can make javascript to generate <img> elements for each image files. Or, whenever gallery app is requested, can I directly make django to auto-generate <img> elements for each of the files in a directory.
I use an image gallery app on my website. At present I drop image
Share
here’s a bit of code for you:
views.py
gallery.html