def index():
    return {
        'releases': (package_service.get_latest_releases()),
        'package_count': package_service.get_package_count(),
        'release_count': package_service.get_release_count(),
        'user_count': user_service.get_user_count(),
    }
Exemplo n.º 2
0
    def __init__(self):
        super().__init__()

        self.releases = package_service.get_latest_releases()
        self.package_count = package_service.get_package_count()
        self.release_count = package_service.get_release_count()
        self.user_count = user_service.get_user_count()
Exemplo n.º 3
0
def index():
    return {
        'releases': package_service.get_latest_releases(),
        'package_count': package_service.get_package_count(),
        'release_count': package_service.get_release_count(),
        'user_count': user_service.get_user_count(),
        'user_id': cookie_auth.get_user_id_via_auth_cookie(flask.request),
    }
Exemplo n.º 4
0
def releases():
    releases = package_service.get_latest_releases()
    return {
        'releases': releases,
        'package_count': package_service.get_package_count(),
        'release_count': package_service.get_release_count(),
        'user_count': user_service.get_user_count(),
    }
Exemplo n.º 5
0
    def __init__(self):
        super().__init__()

        self.releases = package_service.get_latest_releases()
        self.package_count = package_service.get_package_count()
        self.release_count = package_service.get_release_count()
        self.user_count = user_service.get_user_count()

        package_ids = [r.package_id for r in self.releases]
        packages = package_service.get_packages_by_ids(package_ids)

        self.package_lookup = {p.id: p for p in packages}