Portal Utils

inyoka.portal.utils

Utilities for the portal.

copyright:
  1. 2007-2024 by the Inyoka Team, see AUTHORS for more details.

license:

BSD, see LICENSE for more details.

class inyoka.portal.utils.UbuntuVersion(number, name, lts=False, active=False, current=False, dev=False)

This class holds a single Ubuntu version. Based on the settings for lts, active, current, dev, a different notification appears in the forum front-end while selecting the topic version.

The attributes number and name have to be given.

as_json()
is_active()

This function allows a simple access where the version is active, or will be active, or if its support range is outdated.

inyoka.portal.utils.abort_access_denied(request)

Abort with access denied message or redirect to login-page.

inyoka.portal.utils.calendar_entries_for_month(year, month)

Return a list with all days in a month and the calendar entries grouped by day (also make an entry in the list if there is no event)

inyoka.portal.utils.get_ubuntu_versions()
inyoka.portal.utils.google_calendarize(event)