-------------------------------------linking page--------------------------------------------------
{% extends 'base.html'%}
{% block title%}home page{% endblock %}
{% block content %}
<h1>hello vishwabhai</h1>
{% endblock %}
-----------------------------------------base.html---------------------------------------------------------
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{% endblock %}</title>
</head>
<body bgcolor="green">
{% block content %}
{% endblock %}
</body>
</html>
#can also use
<h1>
{% include 'index.html'%}
</h1>
Comments
Post a Comment