Skip to main content

utilities for publishing events as a calendar

Project description

https://img.shields.io/travis/eldarion/kairios.svg https://img.shields.io/coveralls/eldarion/kairios.svg https://img.shields.io/pypi/dm/kairios.svg https://img.shields.io/pypi/v/kairios.svg https://img.shields.io/badge/license-BSD-blue.svg

Provides utilities for publishing events as a calendar.

At the moment, it just provides a visual calendar (both large and small) showing which days have events and optionally linking to a day detail page.

Usage

{% load kairios_tags %}

...

{% calendar events %}

where events implements the following protocol:

events.day_url(year, month, day, has_event, **kwargs)
return a link to the page for the given day or None if there is not to be a day link. has_event is a boolean telling this method whether there is an event on the day or not so you can choose whether a day without an event should link or not.
events.month_url(year, month, **kwargs)
return a link to the page for the given month or None if there is not to be a month link.
events_by_day(year, month, **kwargs)
return a dictionary mapping day number to a list of events on that day.

Note that all methods take additional key-word arguments that can be used in the calculation of the return value.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
kairios-0.4.1.tar.gz (3.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page