You can store file names and paths in databases such sqlite3 or Postgres and then using SQL filter the files path and name you want to fetch. This way you can both show files with similar names and render them accordingly.
I have a folder that contains several images, I would then like to display the list of images that have the same name and number (eg: myfile_page1.png, myfile_page2.png, myfile_page2.png,) and then display them in the django template show_file.html
how can i manipulate several images in a directory and display them conditionally with django?