Answer the question
In order to leave comments, you need to log in
How to display a specific module on the main page?
Help me please!
The situation is this. There is a blog on django made according to the instructions
I made a file about.html and filled it with:
{% extends 'autist/base.html' %}
{% block header %}
Header
{% endblock %}
<html>
<head>
<title>заголовок</title>
</head>
<body>
{% block header %}{% endblock %}
</body>
</html>
def page_about(request):
return render(request, 'autist/about.html');
url(r'^about', views.page_about, name='page_about'),
Answer the question
In order to leave comments, you need to log in
url(r'^$', views.page_about, name='page_about'),
If you need a main page, then of course the name of the view and the url must also be changed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question