Skip to content
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

Support django default styling of paginator #9

Open
bokchan opened this issue May 31, 2021 · 7 comments
Open

Support django default styling of paginator #9

bokchan opened this issue May 31, 2021 · 7 comments

Comments

@bokchan
Copy link

bokchan commented May 31, 2021

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
Copy link
Author

bokchan commented May 31, 2021

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

@shinneider
Copy link
Owner

@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
Copy link
Author

bokchan commented Nov 7, 2021

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

@paul-nameless
Copy link

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

@bokchan
Copy link
Author

bokchan commented Nov 15, 2021

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
Copy link
Owner

@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
Copy link
Author

bokchan commented Nov 28, 2021

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

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

3 participants