Problem with MongoDB & Django (list)

Hi, I use Django and mongoDB, I have a user database in mongodb that contains various information - my question, how to replace the list that is visible in the html code (like in this picture) ?. I would like each number to display a picture from the static folder. (images are named the same as these numbers in the database + png)

As if someone did not understand - wants to replace the list from MongoDB in the form [1, 2, 3] for single ‘1’, ‘2’, ‘3’.