Django HTML Page Render

Опубликовано: 03 Ноябрь 2024
на канале: AI SOFT
293
5

Today we learn how to render html page in Django and it our lacture 2

Imporatant: you can also read django documentation from

"https://www.onlinetutorialspoint.com/...."

step1 now open the previous project on vscode. note: now open a folder where your manage.py file is located

step2 create a folder of "templates" in your home folder. note: make sure your folder name is "templates" not "template" or any other name.

step3 create a file name as index.html in your templates folder

step4 write some html code in your "index.html" file.

step5 go to "views.py" in home folder and render your html page

step6 now run command "python manage.py runserver"

two migrations commands to migrate and then apply migrations.

python .\manage.py makemigrations

python .\manage.py migrate


now our error is solved


TAGS:
HTML page render,django page render,python,python django html page render,django show html page,static files in django,how to show html page in django,how to render html page in django,python projects ideas