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.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

pinax_calendars-0.5-py2.py3-none-any.whl (6.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for pinax-calendars-0.5.tar.gz
Algorithm Hash digest
SHA256 79a72eb2633564a4f042b2f06b793f2ddbcfd2baed8ab0aac536a48ad8d0899a
MD5 6a88664a9137772bf50b820d6c3553ad
BLAKE2b-256 1e99020ce3c89806d4e62f3c880de1ed6754b93f0d026add2826f36487327232

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pinax_calendars-0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a82a7e60c4a5c28042fa69c99c8b8dcc128f57a5a0f60f7c5570bf40e2c8247b
MD5 802cb339325e59e8c5baaaaf86a3523d
BLAKE2b-256 658d269c1b685bd3b72d88dfccc492cfb6313a0d4d38289d16572ec006eff857

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