agusmakmun / django-log-viewer

Django Log Viewer allows you to read & download log files in the admin page
https://pypi.org/project/django-log-viewer/
MIT License
74 stars 30 forks source link

Next Page button inoperable #7

Closed jkarwisch closed 4 years ago

jkarwisch commented 4 years ago

When viewing a log file that spans multiple pages, the Next Page button is enabled, but when pressed, it does not display the next page. The individual page number buttons work as expected, as well as the Previous Page button.

Using version 1.07 on the package.

agusmakmun commented 4 years ago

@jkarwisch thank you for reporting this issue. I think it similiar with #issue 1, the jquery.dataTables.min.js for somehow need to parse the variable with parseInt.

agusmakmun commented 4 years ago

I found a best solution for this: https://stackoverflow.com/a/29396574/6396981

Since this recited code seems to be outdated, I have another possible bugfix for anyone experiencing this problem. This behaviour simply occurs whenever you define within the options:

"pageLength": "30" //bad

instead of

"pageLength": 30 //good

DataTables interprets this as 030 for its internal counters, which leads to this error.