Modified the index view function.
Added a route decorator for URLS of the type /index/1, /index/2 and so on, depicting pages.
The paginate() method returns a Pagination object, whose items attribute has the necessary items, which here is three posts per page.