Skip to main content

A Django calendaring application.

Project description

https://github.com/dakrauth/django-swingtime/workflows/Test/badge.svg https://badge.fury.io/py/django-swingtime.svg
Version:

1.3.0

Demo:

https://nerdfog.com/swingtime/

Download:

https://pypi-hypernode.com/project/django-swingtime/

Source:

https://github.com/dakrauth/django-swingtime

Documentation:

http://dakrauth.github.io/django-swingtime/

Welcome

Swingtime is a Django application similar to a stripped-down version of iCal for Mac OS X or Google Calendar.

Swingtime provides a models.Event model that acts as metadata container for one or more models.Occurrence objects, which describe specific start and end times.

Swingtime relies heavily upon both the datetime standard library package and the dateutil package, featuring direct support for the dateutil.rrule interface to create occurrences.

A fairly simple example:

>>> from datetime import *
>>> from swingtime import models as swingtime
>>> et = swingtime.EventType.objects.create(abbr='work', label='Work Related Events')
>>> evt = swingtime.Event.objects.create(
...     title='New TPS Cover Sheet',
...     description='Kiss off, Lumbergh!',
...     event_type=et
... )
>>> evt.add_occurrences(datetime(2018,3,18,16), datetime(2018,3,18,16,15), count=5)
>>> for o in evt.occurrence_set.all():
...     print(o)
...
New TPS Cover Sheet: 2018-03-18T16:00:00
New TPS Cover Sheet: 2018-03-19T16:00:00
New TPS Cover Sheet: 2018-03-20T16:00:00
New TPS Cover Sheet: 2018-03-21T16:00:00
New TPS Cover Sheet: 2018-03-22T16:00:00

A bit more elaborate example, using the the convenience function models.create_event:

>>> # pay day is the last Friday of the month at 5pm
>>> evt = swingtime.create_event(
...     'Pay day',
...     ('pay', 'Payroll'), # alternate means to add EventType on the fly
...     freq=rrule.MONTHLY,
...     byweekday=rrule.FR(-1),
...     until=datetime(2013,8,1),
...     start_time=datetime(2013,4,1,17)
... )
>>> for o in evt.occurrence_set.all():
...     print(o)
...
Pay day: 2013-04-26T17:00:00
Pay day: 2013-05-31T17:00:00
Pay day: 2013-06-28T17:00:00
Pay day: 2013-07-26T17:00:00

Demo

To view a demo, click here.

To run a local demo using Docker, do the following:

$ docker build -t swingtime .
$ docker run -p 8000:80 -d swingtime:latest

And browse to localhost:8000.

Features

  • Support for adding complex event occurrences via dateutil

  • Ready-made forms.MultipleOccurrenceForm for handling complex input

  • Daily, monthly, and annual view functions

  • Grid-based daily view generator, complete with alternating or sequential EventType CSS-class handling

  • Slightly better than average documentation, a few test cases, and commented code

  • Built-in demo project / application

Requirements

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

django-swingtime-1.3.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

django_swingtime-1.3.1-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file django-swingtime-1.3.1.tar.gz.

File metadata

  • Download URL: django-swingtime-1.3.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for django-swingtime-1.3.1.tar.gz
Algorithm Hash digest
SHA256 050c0ababae5e70c4969f61976bcf687f9c27c01e9986cdc395ae72658e5f83d
MD5 70e1b724e062bab2574fadad21e10bf6
BLAKE2b-256 e0bf4cdd1a0003164a43557a7435d0264afbc91961583d9823c1ce986479fe39

See more details on using hashes here.

File details

Details for the file django_swingtime-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: django_swingtime-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for django_swingtime-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6ac210da678e4151410e143333ced68fccf7cbf9a3d44f1f394b2ffa64130b9
MD5 00844926504eaa7859244607b9273554
BLAKE2b-256 839f3c75f01f7cd3e884a90f34fa4ec7c2ce2eda50d6f621186fbe1d611a33b7

See more details on using hashes here.

Supported by

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