from .models import Page
context={'pages': Page.objects()}
def index(request):
return render(request, 'shablon.html', context)
def feedback(request):
return render(request, 'shablon2.html', context)
def help(request):
context['key'] = '12345' # это мы добовляем новое поле в словарь
return render(request, 'shablon3.html', context)
{% for comment in comments %}
<div class="row d-flex my-3" >
<div class="col-md-2">
<img class="img-fluid" src="{% static 'img/user.png' %}" alt="user">
</div>
<div class="col-md-10 comment">
<strong>{% if comment.id_user.first_name %}{{ comment.id_user.first_name }}{% else %}{{ comment.id_user.username }}{% endif %}</strong> <br>
<p>{{ comment.comment }}</p>
<!-- -->
</div>
</div>
{% endfor %}