如何与Django邮递员分享

时间:2018-04-01 16:24:51

标签: django web

我是Django的新手,我正在开发一个需要用户发送用户消息的项目,所以我决定使用Django postman。我能够在我的项目文件夹中安装,但我遇到的问题与分页有关。收件箱应在20条消息之后分页,但不会。

base_folder.html

<p>

    <div id="postman">
    <h1>{% block pm_folder_title %}{% endblock %}</h1>
    {% autopaginate pm_messages %}
    {% if invalid_page %}
    <p>{% trans "Sorry, this page number is invalid." %}</p>
    {% else %}
    {% if pm_messages %}
    {% b

lock pm_by_modes %}<div id="pm_byModes">

</p>

真需要帮助的人

1 个答案:

答案 0 :(得分:1)

根据FAQ in django-postman docs

  

我安装了django-pagination,但仍然没有看到任何分页小部件

SELECT 
FIRSTNAME,SURNAME,DATEBOOKED,MEMBERSHIPTYPEID,BOOKINGID,MEMBER.MEMBERID
FROM MEMBERSHIP,MEMBER,BOOKING
WHERE MEMBER.MEMBERID = BOOKING.MEMBERID
AND MEMBERSHIP.MEMBERSHIPTYPEID = 3 AND BOOKING.DATEBOOKED between (SYSDATE) and  
(sysdate - interval '1' year) 
AND FIRSTNAME IN (
SELECT distinct FIRSTNAME
FROM MEMBER
GROUP BY FIRSTNAME,SURNAME
HAVING COUNT(FIRSTNAME) >= 5
)
ORDER BY MEMBER.MEMBERID;