Skip to main content

Django utilities for publishing events as a calendar

Project description

pinax-calendars
=======

.. image:: http://slack.pinaxproject.com/badge.svg
:target: http://slack.pinaxproject.com/

.. image:: https://img.shields.io/travis/pinax/pinax-calendars.svg
:target: https://travis-ci.org/pinax/pinax-calendars

.. image:: https://img.shields.io/coveralls/pinax/pinax-calendars.svg
:target: https://coveralls.io/r/pinax/pinax-calendars

.. image:: https://img.shields.io/pypi/dm/pinax-calendars.svg
:target: https://pypi.python.org/pypi/pinax-calendars/

.. image:: https://img.shields.io/pypi/v/pinax-calendars.svg
:target: https://pypi.python.org/pypi/pinax-calendars/

.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://pypi.python.org/pypi/pinax-calendars/

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 pinax_calendars_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.

Source Distribution

pinax-calendars-0.6.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

pinax_calendars-0.6-py2.py3-none-any.whl (7.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pinax-calendars-0.6.tar.gz.

File metadata

File hashes

Hashes for pinax-calendars-0.6.tar.gz
Algorithm Hash digest
SHA256 8271af2f6cc4446af827ccbf85c8e8ec60c28dd684a8755bdd09b6b22ad9fccd
MD5 adeec6c7f0aab9729796783611296b4f
BLAKE2b-256 de6829d15f3d3299164d50758957f2237fcedceadc58f0b79a1fdb778cc2ac3f

See more details on using hashes here.

File details

Details for the file pinax_calendars-0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pinax_calendars-0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2f50bd2de84ed4932037abe8500e9d54ce5ef189771331e3ab936c089bf7a14a
MD5 b1b653d6210dae8ef5b7a17b49e63828
BLAKE2b-256 a9d74c0b513909d375ba4002d1393561a33801569b9e4a178ae14f8d4599bce3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page