Paginator.{previous,next}_page_number throw exceptions for invalid pages on Django 1.5, resolve this issue