Skip to content

Doesn't work inside of html <table> element. #75

Open
@rightx2

Description

@rightx2

views.py


from el_pagination.views import AjaxListView

from clien.models import ClienPost


class ClienListView(AjaxListView):
    model = ClienPost
    context_object_name = "posts"
    template_name = "clien/clien_list.html"
    page_template = 'clien/clien_list_page.html'

    def get_queryset(self):
        posts = ClienPost.objects.active()
        return posts

template

{% block content %}
<table class="table table-hover table-expandable table-striped">
    <thead>
      <tr>
        <th> 카테고리 </th>
        <th> 제 목 </th>
        <th> 게시날짜 </th>
        <th> 좋아요 </th>
      </tr>
    </thead>
    <tbody>
      {% include page_template %}
    </tbody>
</table>
{% endblock %}



{% block custom_js %}
    <script src="{% static 'el-pagination/js/el-pagination.js' %}"></script>
    <script>
        $.endlessPaginate({
            paginateOnScroll: true,
            paginateOnScrollChunkSize: 20
        });
    </script>
    {% javascript "clien" %}
{% endblock %}

page_template

{% load el_pagination_tags %}

{% lazy_paginate posts %}

{% for post in posts %}
    <tr>
        <td> {{ post.category }} </td>
        <td> {{ post.title }} </td>
        <td> {{ post.post_date }} </td>
        <td> 좋아요 logo </td>
    </tr>
{% endfor %}

{% show_more %}

It shows more upper side of contents like this:

image

If I clicked more, new contents is loaded "on" the previous posts..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions