Skip to content
Utility for working with recurring dates in Django.
Branch: master
Clone or download
OmenApps and dominicrodger Updated to provide useful information on PyPI (#138)
- Added long_description, which reads README.md
- Added URL to github repository
Latest commit fb4ee8a Mar 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Version bump and docs for 1.9.0 Feb 28, 2019
recurrence Fixes #87 (#137) Feb 28, 2019
tests Update coverts_to_utc test recurrence field to be not required Nov 20, 2018
.gitignore
.travis.yml
LICENSE added manifest file, moved license location Apr 1, 2009
MANIFEST.in
Makefile Always build before pushing Nov 20, 2018
README.md
pytest.ini
requirements_test.txt
setup.py Updated to provide useful information on PyPI (#138) Mar 1, 2019
tox.ini

README.md

django-recurrence

Build Status

django-recurrence is a utility for working with recurring dates in Django. Documentation is available at https://django-recurrence.readthedocs.org/.

It provides:

  • Recurrence/Rule objects using a subset of rfc2445 (wraps dateutil.rrule) for specifying recurring date/times;
  • RecurrenceField for storing recurring datetimes in the database;
  • JavaScript widget.

RecurrenceField provides a Django model field which serializes recurrence information for storage in the database.

For example - say you were storing information about a university course in your app. You could use a model like this:

import recurrence.fields

class Course(models.Model):
    title = models.CharField(max_length=200)
    start = models.TimeField()
    end = models.TimeField()
    recurrences = recurrence.fields.RecurrenceField()

You'll notice that I'm storing my own start and end time. The recurrence field only deals with recurrences not with specific time information. I have an event that starts at 2pm. Its recurrences would be "every Friday". For this to work, you'll need to put the recurrence application into your INSTALLED_APPS

Running the tests

Our test coverage is currently fairly poor (we're working on it!), but you can run the tests by making sure you've got the test requirements installed:

pip install -r requirements_test.txt

Once you've done that, you can run the tests using:

make test

You can generate a coverage report by running:

make coverage

You can run tests on multiple versions of Python and Django by installing tox (pip install tox) and running:

tox
You can’t perform that action at this time.