tgdn/django-bootstrap-pagination — pull request #2 by borgstrom (2013-02-26 21:46:11+00:00)
Title: Handle EmptyPage & PageNotAnInteger, prevent default in disabled links

Template Tag Changes
----------------------------------
In the autopaginate template tag handler this adds handling for the two specific InvalidPage exceptions per the django documentation:

https://docs.djangoproject.com/en/1.5/topics/pagination/#using-paginator-in-a-view

It does this in a way that maintains backwards compatibility for users by introducing a new setting:

PAGINATION_INVALID_PAGE_FIXUP

It defaults to ```False```, but if set to ```True``` then it will return the most appropriate page if an invalid one is requested.

Template changes
---------------------------
The main thing this does is not generate links if the page would be an invalid link (ie. currently it generates a back link to page 0 from page 1).

This also fixes up the template to ensure that links that preform no action (ie. ```href="#"```) also have an onclick handler that returns false to ensure that the page does not jump around. If you have your pagination links at the bottom of a table and you click a link to "#" it can take you back to the top of the page.