0

I just started to write an application using Django 2 and the most recent version of django-tables2. So far everything works without any problems but now I have a question. I would like to display some data by using a sticky header and infinite scroll (so instead of having Page 1,2,3...,N at the bottom of the table I want to scroll down).

I checked several pages(including the official documentation of django-tables2 https://django-tables2.readthedocs.io/en/latest/index.html). But I didn't find any solution which do the trick. I was thinking of using django-endless-pagination(https://django-endless-pagination.readthedocs.io/en/latest/start.html#quickstart) in combination with django-tables2 but I am not even sure if this would work.

So my question would be is it possible to use infinite scroll with django-tables2 ?

  • [django-endless-pagination](https://github.com/frankban/django-endless-pagination) --> This project is abandoned. Don't think its a good idea. – Lu Chinke May 08 '19 at 15:17
  • @LuSchink You probably right there won't make sense... Do you have another idea or I could i achieve infinte-scroll with django-tables2 ? – Der edle weiße Ritter May 08 '19 at 15:20

2 Answers2

1

I don't think you can use that logic for this. django-tables2 is a usefull plugin that acts on server-side, when Django renders the template.

For doing that infinite scrolling you must implement some javascript, doing the requests and adding html dynamically when user 'gets to the bottom'. I will not lie, it's not easy, but it's fun! x)

Lu Chinke
  • 622
  • 2
  • 8
  • 27
0

So if someone else is looking for this the answer is NO.