django-el-pagination
django-el-pagination copied to clipboard
Doesn't work inside of html `<table>` element.
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:
If I clicked more
, new contents is loaded "on" the previous posts..
I am having nearly the exact same issue and both our views and templates are configured nearly identically. When I click the more
it inserts an oddly formatted version above the table like so
I am using Django 1.10.6
There was a PR for this in the original django-endless-pagination project for this. Maybe this can be included here. https://github.com/frankban/django-endless-pagination/pull/79
Sorry, How could I implement show_more in table ? (without old version django-endless-pagination)
I can add tag show_more_table (based on PR from old app) to future if anybody make PR with documentation and tests for this future.
@shtalinberg check it please #151