Здравствуйте. Кажется, у меня проблема с использованием базового шаблона.Мой базовый html называется help_content.html.
<html>
<head>
<meta http-equiv="CONTENT-TYPE" content="text/html; charset=UTF-8">
<a href="help_new_client.html">New Client</a>
<title>User Manual</title>
<style></style></head>
<body style="padding:10px;">
{% block content %}{% endblock %}
</body>
</html>
Вот мой дочерний шаблон с именем help_new_client.html
{% extends "help_content.html" %}
{% block content %}
<h3 class="western">New Client</h3>
<p><b>Add client</b></p>
<p>If you are not already on the All clients screen then click “VIEW
CLIENTS” on the main menu.</p>
<p>Click on the Add client button. A Client form is displayed. Fill
the form and click save.</p>
<p>Action: VIEW CLIENTS → Add client → save</p>
<p><b>Edit client</b></p>
<p>To edit a client simply click on the client in the All clients
list. Edit the clients information and save.</p>
<p>Action: VIEW CLIENT → click on client → click on Edit client
information → save
</p>
{% endblock %}
РЕДАКТИРОВАТЬ: просмотры
@login_required
def help_index(request):
return render_to_response('help_content.html', context_instance=RequestContext(request))
@login_required
def help_new_client(request):
return render_to_response('help_new_client.html', context_instance=RequestContext(request))
Я не совсем уверенчто я сделал не такВ help_content.html я вижу {% block content %}{% endblock %}
, а в help_new_client.html я вижу {% extends "help_content.html" %}
{% block content %}
{% endblock %}
.Я не уверен, почему я получаю эти шаблоны тегов, а не мой контент.