shinneider/django-admin-inline-paginator

Support django default styling of paginator

Opened this issue · 7 comments

I integrated django-admin-inline-paginator into our project and it works great! Thanks a lot!

However the package defines custom css classes in the paginator.html template

It means that the default django styling of the paginator is overridden.

We experienced that using it together with the default django flat theme resulted in the available page links being rendered as white text on white background.

I suggest a solution where the pagination style is generated with the same classes as in https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/pagination.html

I created a branch with the suggested solution and a few other improvements, https://github.com/bokchan/django-admin-inline-paginator/tree/support-django-default-styling

  • Support hiding of next/prev links
  • Use default django paginator styles in tabular_paginator template
  • Update failing unittests

@bokchan open a PR to my repo...
is a great fixes and options...
if you open this weekend, i evaluate merge and release a new version with your fixes on Monday

@shinneider I won't have time this weekend but I will try to make it happen next week.

Hello guys, just faced the same issue.
It would be very helpful if you'll fix it!

I worked on the issue in the weekend. Rebased on top of latest master. My fix works with django-admin-interface but it won't fix integration with other custom admin theming packages, e.g. grappelli (raised in #4)
I am not sure what the best approach is. I adapted the package for our use case, but I it doesn't make sense to merge that into master if it isn't a generic solution that works for any package.
WDYT @shinneider ?

@bokchan make sense

A generic solution is a best for this case. but i no have much time for develop it.

we keep this pr open, in case someone with availability appears.

Makes sense @shinneider . I am also quite busy but I will try to work on the issue if I get some extra time.