shinneider / django-admin-inline-paginator

MIT License
125 stars 21 forks source link

Support django default styling of paginator #9

Open bokchan opened 3 years ago

bokchan commented 3 years ago

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

bokchan commented 3 years ago

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

shinneider commented 2 years ago

@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

bokchan commented 2 years ago

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

paul-nameless commented 2 years ago

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

bokchan commented 2 years ago

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 ?

shinneider commented 2 years ago

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

bokchan commented 2 years ago

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