A Django calendaring application.
Project description
- Version:
1.5.2
- Demo:
- Download:
- Source:
- Documentation:
Description
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 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
Python 3.10+
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_swingtime-1.5.2.tar.gz
.
File metadata
- Download URL: django_swingtime-1.5.2.tar.gz
- Upload date:
- Size: 20.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8effa96c3cc27ec647c8cb3249507c36f6c26df76a39b202762296fe92ddffca |
|
MD5 | de2c6c18f97a4baf06f4f6b3579731ee |
|
BLAKE2b-256 | f898ea152ccffdc2f56f79822a2658382fdba501a42d30a0b96b0fdeee00d88a |
File details
Details for the file django_swingtime-1.5.2-py3-none-any.whl
.
File metadata
- Download URL: django_swingtime-1.5.2-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8001df80299dfbcfd1949cf6f52254e0802ab58e2410b5310c1cd6fc0a1ab327 |
|
MD5 | 23211ce1ff5df97a775e642ff4ff7493 |
|
BLAKE2b-256 | 7323eeefceffaaf5ecf8219c70226dffd207acc874550fc4d137000dc0fca671 |