Remove django-pagination.

Have local copy of its paginate function.
Fix pagination errors.

An incorrect way of catching multiple exceptions,
and evening up the use of the window.