jmcclell / django-bootstrap-pagination

Django template tag for rendering Page objects as Bootstrap pagination HTML
MIT License
212 stars 83 forks source link

Parser? #36

Closed Robrechtc closed 8 years ago

Robrechtc commented 8 years ago

Hey, I'm trying to use your bootstrap_paginate template tag in a view (I know this isn't proper coding, but I need to write some dirty code as I'm getting close to the deadline and still have a lot of work). I saw that your bootstrap_paginate() requires two args: a parser and a token. I'm fairly certain the token is the page_obj, but I'm not sure what to use for parser and I couldn't immediately find what value I should put there. Could you point me in the right direction?

Many thanks in advance, Boogy :)

jmcclell commented 8 years ago

For future reference, StackOverflow or something similar would likely garner a quicker response. For Django, custom template tags are passed a Parser object created by the framework itself.

https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/

You can probably poke around the Django source to get more information.