view libervia/__init__.py @ 1140:e1a953512f72

pages (blog/view): pagination improvments: - getBlogData renamed to getBlogItems and only returns BlogItems objects, blog_data are not returned anymore as they are already included in the metadata attribute - desired page size can be specified using "page_max" key in request data - better use of RSM data to know if we should set previous or next page URLs - don't display anymore the first page is no items are found, this was confusing and not really making sense
author Goffi <goffi@goffi.org>
date Fri, 11 Jan 2019 16:45:01 +0100
parents 28e3eb3bb217
children b290f21e8466
line wrap: on
line source

import os.path

version_file = os.path.join(os.path.dirname(__file__), "VERSION")
try:
    with open(version_file) as f:
        __version__ = f.read().strip()
except NotImplementedError:
    # pyjamas workaround
    __version__ = "0.7.0D"