Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rightx2 opened this issue Apr 6, 2017 · 5 comments
Open

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

rightx2 opened this issue Apr 6, 2017 · 5 comments

Comments

@rightx2
Copy link

rightx2 commented Apr 6, 2017

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..

@af3ld
Copy link

af3ld commented Apr 6, 2017

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

screen shot 2017-04-06 at 11 00 34 am

I am using Django 1.10.6

@L-Henke
Copy link

L-Henke commented Apr 11, 2017

There was a PR for this in the original django-endless-pagination project for this. Maybe this can be included here. frankban/django-endless-pagination#79

@hungphamvn
Copy link

Sorry, How could I implement show_more in table ? (without old version django-endless-pagination)

@shtalinberg
Copy link
Owner

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.

@aropan
Copy link
Contributor

aropan commented Mar 7, 2021

@shtalinberg check it please #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants