How to Render HTML files in Django - Python Web Development

Published: 25 June 2021
on channel: codevev
2,281
51

#Python #Shorts

It would be miserable if we had to type our HTML code as strings within the Python files. Thankfully, Django doesn't want us to be miserable and allows us to keep our HTML files separately from our views.py file but still allows us to render them.
To do that, we need to import the "render" method from "django.shortcuts" module and then use it inside of our view function.
-------------------------------------------------------------------------------------
Links:
Blog: https://evgenyurubkov.com
Twitter:   / evgenyurubkov  
Instagram:   / evgenyurubkov  
Youtube:    / @codevev  


Watch video How to Render HTML files in Django - Python Web Development online without registration, duration hours minute second in high quality. This video was added by user codevev 25 June 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,281 once and liked it 51 people.