How to generate a block of HTML code when submitting a form via Django

I would be grateful if someone explained to me how I could create a block of HTML Code when submitting a form with Django. For instance, if I want to upload an image, how could I automatically generate a HTML code block that puts the image inside a div with background and etc. Thanks!

I searched a bit through documentation, and on the internet and couldn't find much about it.

Back to Top