【发布时间】:2016-10-14 16:44:40
【问题描述】:
鉴于此link 用于 Django 中的推特式分页。我正在尝试在我的应用程序中实现相同的功能,但无法理解模板的拆分。我在这里给出了我想要应用分页的 HTML 页面的代码。根据我的 HTML 代码,谁能帮助我回答我应该在两个模板中写什么,一个是 entry_index.html,另一个是 entry_index_page.html(如链接中所述)?
下面是我正在为其应用分页的 html 页面的代码:
{% extends 'talks/base.html' %}
{% block content %}
<!-- .header-bottom-wrapper -->
<div class="header-bottom-wrapper">
<div class="container">
<div class="row">
<!-- Page Head -->
<div class="page-head col-lg-12">
<h2 class="page-title">Gallery</h2>
</div>
<!-- End Page Head -->
</div>
</div>
</div><!-- End of .header-bottom-wrapper -->
<!-- page-container -->
<div class="page-container container">
<!-- Gallery Filter -->
<div id="gallery-container">
<div class="row gallery-4-columns isotope clearfix">
{% for photo in pics %}
<div class="gallery-item isotope-item issues col-lg-3 col-md-3 col-sm-3 col-xs-6">
<figure>
<a class="zoom swipebox" href="{{photo.image.url}}" title="{{photo.title}}"></a>
<div class="media_container"></div>
<img src="{{photo.image.url}}" alt="{{photo.title}}" width="346px" height="200px">
</figure>
</div>
{% endfor %}
</div>
</div>
</div><!-- End of .page-container -->
{% endblock %}
【问题讨论】: