-
Notifications
You must be signed in to change notification settings - Fork 171
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
Added setting to allow change the template when pagination is rendered #35
base: master
Are you sure you want to change the base?
Conversation
+1 for this, but |
|
That's for the Class-based views. If you use a normal Django view, you don't have that variable in your template. I had to remove it to get the pagination. |
I fear this might break CBV templates. |
…n class-based views
it won't break it, even the default template (pagination.html) doesn't have it. The idea to have a template setting is to be able to set your own template. You are free to use an existing or your own template. The template (pagination-bootstrap.html) was included in this project as well. I have added the template pagination-bootstrap-class-based-view.html to use it in a CBV so that you can choose the one that suits you better. |
Let's say you have 'my_pagination.html' in your project. In your normal page template you can replace And no settings required. Also, unlike with settings, you don't need to restart server if you switch between Or am I missing the point of this change? |
Sometimes you want to render a different template like pure_pagination/pagination-bootstrap.html, which is included in this project. Adding a TEMPLATE setting will be enough to do it, using as default the existing one (pure_pagination/pagination.html).