Skip to main content
Latest PyPI version Number of PyPI downloads Test cone.calendar

This package provides a calendar integration in to cone.app. It utilizes jQuery Fullcalendar (https://github.com/fullcalendar/fullcalendar).

Currently, version 6.1 is included (see package.json). See (https://github.com/fullcalendar/fullcalendar/releases).

Calendar Widget

The calendar widget integration is done via cone.calendar.browser.CalendarTile which is registered by name calendar.

The overall calendar configuration is done via model properties.

from cone.app.model import BaseNode
from cone.app.model import Properties

class MyCalendar(BaseNode):

    @property
    def properties(self):
        props = Properties()
        props.default_content_tile = 'calendar'
        props.calendar_header = {
            'left': 'month,agendaWeek,agendaDay',
            'center': 'title',
            'right': 'today prev,next'
        }
        return props

For a full list of available calendar options read cone.calendar.browser.CalendarTile documentation.

A calendar rendered on several kinds of nodes can say what it shows. Set calendar_title on a CalendarTile subclass, it is rendered as card header above the calendar. None by default, no header then.

from cone.calendar.browser import CalendarTile
from cone.tile import tile

@tile(
    name='calendar',
    path='cone.calendar.browser:calendar.pt',
    interface=IMyCalendar,
    permission='view')
class MyCalendarTile(CalendarTile):

    @property
    def calendar_title(self):
        return f'Calendar: {self.model.metadata.title}'

Calendar Events

In order to display events in the calendar, one or more event data sources must be provided.

Concrete event data implementation must derive from cone.calendar.browser.CalendarEvents and provide events function.

The default event data source is expected as JSON view registered by name calendar_events for a dedictaed model context.

from cone.calendar.browser import CalendarEvents
from datetime import datetime
from pyramid.view import view_config
import uuid

@view_config(
    name='calendar_events',
    context=MyCalendar,
    accept='application/json',
    renderer='json',
    permission='view')
class MyEvents(CalendarEvents):

    def events(self, start, end):
        events = [{
            'id': uuid.uuid4(),
            'title': 'Title',
            'start': datetime(2020, 4, 29, 17, 40),
            'end': datetime(2020, 4, 29, 18, 0),
        }]
        return events

For a full list of available event options read cone.calendar.browser.CalendarEvents documentation.

Multiple event data sources are defined via model properties.

class MyCalendar(BaseNode):

    @property
    def properties(self):
        props = Properties()
        props.calendar_sources = [{
            'events': 'event_data_1',
            'color': 'green'
        }, {
            'events': 'event_data_2',
            'color': 'red'
        }]
        return props

For a full list of available event source options read cone.calendar.browser.CalendarTile documentation.

Locales

The calendar locale can be set via calendar_locale on model properties.

class MyCalendar(BaseNode):

    @property
    def properties(self):
        props = Properties()
        props.calendar_locale = 'de'
        return props

Default calendar locale is en. The desired locales must be delivered to the browser in order to work correctly. Locales to deliver are defined in the application ini config as comma separated list of locale names.

cone.calendar.locales = de,fr

For a complete list of available locales see browser/static/fullcalendar/locales folder of this package.

Contributors

  • Robert Niederreiter

  • Johannes Raggam

Changes

2.0.0 (2026-10-24)

  • Add optional CalendarTile.calendar_title, rendered as card header above the calendar. For a calendar shown on several kinds of nodes, where what it shows depends on the node. None by default, the markup is unchanged then. [rnix]

  • Modernise the code ruff flags as outdated: class X(object). Remove unused import. Behaviour unchanged. super(Class, self) is kept, see cone.app. [rnix]

  • Add qa.ruff domain to Makefile and pin the ruff rule selection in pyproject.toml, make check runs ruff check. [rnix]

  • Bootstrap 5 Styles.

1.1.1 (2026-04-28)

  • Fix span tag receiving icon class in calendar contextmenu. [lenadax]

1.1.0 (2026-02-03)

  • Refactor package layout to use pyproject.toml and implicit namespace packages. [rnix]

  • Setup Makefile. [lenadax]

  • Run tests with pytest. [lenadax]

1.0a1 (2023-05-15)

  • Use webresource for resource registration. [rnix]

0.4 (2025-10-25)

  • Pin upper versions of dependencies. [rnix]

0.3 (2022-10-06)

  • Modernize JavaScript. [rnix]

0.2 (2020-07-09)

  • Add show_contextmenu to CalendarTile. Defaults to False. [rnix]

  • Also check for action length when handling actions dropdown in JS. [rnix]

0.1 (2020-05-30)

  • Initial. [rnix, thet]

License

Copyright (c) 2017-2021, BlueDynamics Alliance, Austria Copyright (c) 2021-2025, Cone Contributors All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Metadata

Release files for cone.calendar 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cone.calendar 2.0.0
File Size Uploaded Provenance Actions
cone_calendar-2.0.0.tar.gz 222.8 kB Without provenance Details for cone_calendar-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cone.calendar 2.0.0
File Interpreter ABI Platform Actions
cone_calendar-2.0.0-py3-none-any.whl Python 3 none any Details for cone_calendar-2.0.0-py3-none-any.whl

Total release size: 450.1 kB

Release files / cone_calendar-2.0.0.tar.gz

Download URL cone_calendar-2.0.0.tar.gz
Size 222.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fff3431e66d85df141531a92bad537ece6326bc925a6152af23756595612891d
BLAKE2b-256 checksum
How to use checksums
b02a505c1c27d7f1753d0f69bbf0c1033f5f3c642d1344de99c8623b78a8beca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Release files / cone_calendar-2.0.0-py3-none-any.whl

Download URL cone_calendar-2.0.0-py3-none-any.whl
Size 227.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c33014659febcd8eb188aab0f581b5b2bcb15793cfb255b1c67792d93c2bb0bb
BLAKE2b-256 checksum
How to use checksums
7ea525b7dad963b971a991816e5cf84b902eff550528a2ba110d11d489ddb01e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.2

Security for cone.calendar 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page