#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
Смотрите видео How to Render HTML files in Django - Python Web Development онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь codevev 25 Июнь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,281 раз и оно понравилось 51 людям.