cone.calendar


Namecone.calendar JSON
Version 0.4 PyPI version JSON
download
home_pagehttp://github.com/conestack/cone.calendar
SummaryjQuery Fullcalendar integration for cone.app
upload_time2025-10-25 10:19:11
maintainerNone
docs_urlNone
authorCone Contributors
requires_pythonNone
licenseSimplified BSD
keywords node pyramid cone web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/cone.calendar.svg
    :target: https://pypi.python.org/pypi/cone.calendar
    :alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/dm/cone.calendar.svg
    :target: https://pypi.python.org/pypi/cone.calendar
    :alt: Number of PyPI downloads

.. image:: https://travis-ci.org/bluedynamics/cone.calendar.svg?branch=master
    :target: https://travis-ci.org/bluedynamics/cone.calendar

.. image:: https://coveralls.io/repos/github/bluedynamics/cone.calendar/badge.svg?branch=master
    :target: https://coveralls.io/github/bluedynamics/cone.calendar?branch=master


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.

.. code-block:: python

    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.

.. code-block:: python

    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.

.. code-block:: python

    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.

.. code-block:: python

    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.

.. code-block:: ini

    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
=======

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

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/conestack/cone.calendar",
    "name": "cone.calendar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "node pyramid cone web",
    "author": "Cone Contributors",
    "author_email": "dev@conestack.org",
    "download_url": "https://files.pythonhosted.org/packages/99/44/ed5b20f018ec59c72380ac6311727574bd1665b13c6e54ae3c708bb249c6/cone_calendar-0.4.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/cone.calendar.svg\n    :target: https://pypi.python.org/pypi/cone.calendar\n    :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/dm/cone.calendar.svg\n    :target: https://pypi.python.org/pypi/cone.calendar\n    :alt: Number of PyPI downloads\n\n.. image:: https://travis-ci.org/bluedynamics/cone.calendar.svg?branch=master\n    :target: https://travis-ci.org/bluedynamics/cone.calendar\n\n.. image:: https://coveralls.io/repos/github/bluedynamics/cone.calendar/badge.svg?branch=master\n    :target: https://coveralls.io/github/bluedynamics/cone.calendar?branch=master\n\n\nThis package provides a calendar integration in to cone.app.\nIt utilizes jQuery Fullcalendar\n(https://github.com/fullcalendar/fullcalendar).\n\nCurrently, tag 3.1.0 is included. See\n(https://github.com/fullcalendar/fullcalendar/releases).\n\n\nCalendar Widget\n---------------\n\nThe calendar widget integration is done via\n``cone.calendar.browser.CalendarTile`` which is registered by name ``calendar``.\n\nThe overall calendar configuration is done via model properties.\n\n.. code-block:: python\n\n    from cone.app.model import BaseNode\n    from cone.app.model import Properties\n\n    class MyCalendar(BaseNode):\n\n        @property\n        def properties(self):\n            props = Properties()\n            props.default_content_tile = 'calendar'\n            props.calendar_header = {\n                'left': 'month,agendaWeek,agendaDay',\n                'center': 'title',\n                'right': 'today prev,next'\n            }\n            return props\n\nFor a full list of available calendar options read\n``cone.calendar.browser.CalendarTile`` documentation.\n\n\nCalendar Events\n---------------\n\nIn order to display events in the calendar, one or more event data sources\nmust be provided.\n\nConcrete event data implementation must derive from\n``cone.calendar.browser.CalendarEvents`` and provide ``events`` function.\n\nThe default event data source is expected as JSON view registered by name\n``calendar_events`` for a dedictaed model context.\n\n.. code-block:: python\n\n    from cone.calendar.browser import CalendarEvents\n    from datetime import datetime\n    from pyramid.view import view_config\n    import uuid\n\n    @view_config(\n        name='calendar_events',\n        context=MyCalendar,\n        accept='application/json',\n        renderer='json',\n        permission='view')\n    class MyEvents(CalendarEvents):\n\n        def events(self, start, end):\n            events = [{\n                'id': uuid.uuid4(),\n                'title': 'Title',\n                'start': datetime(2020, 4, 29, 17, 40),\n                'end': datetime(2020, 4, 29, 18, 0),\n            }]\n            return events\n\nFor a full list of available event options read\n``cone.calendar.browser.CalendarEvents`` documentation.\n\nMultiple event data sources are defined via model properties.\n\n.. code-block:: python\n\n    class MyCalendar(BaseNode):\n\n        @property\n        def properties(self):\n            props = Properties()\n            props.calendar_sources = [{\n                'events': 'event_data_1',\n                'color': 'green'\n            }, {\n                'events': 'event_data_2',\n                'color': 'red'\n            }]\n            return props\n\nFor a full list of available event source options read\n``cone.calendar.browser.CalendarTile`` documentation.\n\n\nLocales\n-------\n\nThe calendar locale can be set via ``calendar_locale`` on model properties.\n\n.. code-block:: python\n\n    class MyCalendar(BaseNode):\n\n        @property\n        def properties(self):\n            props = Properties()\n            props.calendar_locale = 'de'\n            return props\n\nDefault calendar locale is ``en``. The desired locales must be delivered to\nthe browser in order to work correctly. Locales to deliver are defined in the\napplication ini config as comma separated list of locale names.\n\n.. code-block:: ini\n\n    cone.calendar.locales = de,fr\n\nFor a complete list of available locales see ``browser/static/fullcalendar/locales``\nfolder of this package.\n\n\nContributors\n============\n\n- Robert Niederreiter\n- Johannes Raggam\n\n\nChanges\n=======\n\n0.4 (2025-10-25)\n----------------\n\n- Pin upper versions of dependencies.\n  [rnix]\n\n\n0.3 (2022-10-06)\n----------------\n\n- Modernize JavaScript.\n  [rnix]\n\n\n0.2 (2020-07-09)\n----------------\n\n- Add ``show_contextmenu`` to ``CalendarTile``. Defaults to ``False``.\n  [rnix]\n\n- Also check for action length when handling actions dropdown in JS.\n  [rnix]\n\n\n0.1 (2020-05-30)\n----------------\n\n- Initial.\n  [rnix, thet]\n\n\nLicense\n=======\n\nCopyright (c) 2017-2021, BlueDynamics Alliance, Austria\nCopyright (c) 2021, Cone Contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
    "bugtrack_url": null,
    "license": "Simplified BSD",
    "summary": "jQuery Fullcalendar integration for cone.app",
    "version": "0.4",
    "project_urls": {
        "Homepage": "http://github.com/conestack/cone.calendar"
    },
    "split_keywords": [
        "node",
        "pyramid",
        "cone",
        "web"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d7a1fe33416ca6bbb22a54a69478ae62d1faeaf4aaf41cab4b4920d7ffd5d190",
                "md5": "9af4ad0e314c69b3e30a59c81ae555aa",
                "sha256": "d8bbabadb0ad3e773007f111862f81d05980dfbe396d969646f916be95dfc1b6"
            },
            "downloads": -1,
            "filename": "cone_calendar-0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9af4ad0e314c69b3e30a59c81ae555aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 731470,
            "upload_time": "2025-10-25T10:19:08",
            "upload_time_iso_8601": "2025-10-25T10:19:08.340769Z",
            "url": "https://files.pythonhosted.org/packages/d7/a1/fe33416ca6bbb22a54a69478ae62d1faeaf4aaf41cab4b4920d7ffd5d190/cone_calendar-0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9944ed5b20f018ec59c72380ac6311727574bd1665b13c6e54ae3c708bb249c6",
                "md5": "23a76e7ffca3a6b8f8f5c2f7f76774a9",
                "sha256": "ab8d6d36709f04a2d67e7ee95c9db8283734ab66169dfb1b616c28f5ae609d48"
            },
            "downloads": -1,
            "filename": "cone_calendar-0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "23a76e7ffca3a6b8f8f5c2f7f76774a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 586993,
            "upload_time": "2025-10-25T10:19:11",
            "upload_time_iso_8601": "2025-10-25T10:19:11.970600Z",
            "url": "https://files.pythonhosted.org/packages/99/44/ed5b20f018ec59c72380ac6311727574bd1665b13c6e54ae3c708bb249c6/cone_calendar-0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-25 10:19:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "conestack",
    "github_project": "cone.calendar",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cone.calendar"
}
        
Elapsed time: 2.00373s