Skip to main content

jQuery Fullcalendar integration for cone.app

Project description

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, tag 3.1.0 is included. 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.

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

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.

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

cone_calendar-1.1.0.tar.gz (580.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cone_calendar-1.1.0-py3-none-any.whl (731.6 kB view details)

Uploaded Python 3

File details

Details for the file cone_calendar-1.1.0.tar.gz.

File metadata

  • Download URL: cone_calendar-1.1.0.tar.gz
  • Upload date:
  • Size: 580.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cone_calendar-1.1.0.tar.gz
Algorithm Hash digest
SHA256 78eb746de3db8084c11012f9fe3a16b797a838fccaeef6eeffddca05c30c8ee5
MD5 639ce969aabeb7c116d5d53a033dfcf3
BLAKE2b-256 740546d9b06eb463e00a6d347fe909da491d4811366899a01a1e652bb663ebfc

See more details on using hashes here.

File details

Details for the file cone_calendar-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: cone_calendar-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 731.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for cone_calendar-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ee9ed454b90124409f3ef4b6094a7b28d78fed8339f9cc456448b2281cd65ec
MD5 02057424cf67334f2946a4a77f2dbdff
BLAKE2b-256 f150dc7553b9fa29ee1665e3819ab24a24c05042d2c892d8b8ff87da92fdd2c9

See more details on using hashes here.

Supported by

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