A calendaring app for Django. It is now stable, Please feel free to use it now. Active development has been taken over by bartekgorny.

Overview

Django-schedule

A calendaring/scheduling application, featuring:

  • one-time and recurring events
  • calendar exceptions (occurrences changed or cancelled)
  • occurrences accessible through Event API and Period API
  • relations of events to generic objects
  • ready to use, nice user interface
  • view day, week, month, three months and year
  • project sample which can be launched immediately and reused in your project

See see wiki page for more.

Installation

Download the code; put in into your project’s directory or run

python setup.py install
to install system-wide.

REQUIREMENTS: python-vobject (comes with most distribution as a package).

Settings.py

REQUIRED

INSTALLED_APPS – add:
‘schedule’

TEMPLATE_CONTEXT_PROCESSORS – add:
“django.core.context_processors.request”

Optional

FIRST_DAY_OF_WEEK

This setting determines which day of the week your calendar begins on if your locale doesn’t already set it. Default is 0, which is Sunday.

OCCURRENCE_CANCEL_REDIRECT

This setting controls the behavior of :func:`Views.get_next_url`. If set, all calendar modifications will redirect here (unless there is a `next` set in the request.)

SHOW_CANCELLED_OCCURRENCES

This setting controls the behavior of :func:`Period.classify_occurence`. If True, then occurences that have been cancelled will be displayed with a css class of canceled, otherwise they won’t appear at all.

Defaults to False

CHECK_PERMISSION_FUNC

This setting controls the callable used to determine if a user has permission to edit an event or occurance. The callable must take the object and the user and return a boolean.

Default:


check_edit_permission(ob, user):
return user.is_authenticated()

If ob is None, then the function is checking for permission to add new events

GET_EVENTS_FUNC

This setting controls the callable that gets all events for calendar display. The callable must take the request and the calendar and return a `QuerySet` of events. Modifying this setting allows you to pull events from multiple calendars or to filter events based on permissions

Default:


get_events(request, calendar):
return calendar.event_set.all()

Comments
  • Support mulitple event days shown in template

    Support mulitple event days shown in template

    If an event is created that spans multiple days, then in the monthly template view, it should show it across the days. With the current release it cuts off and creates two events on each day, which gives the impression that it is separate events and not a continuous spanning event.

    It would be good to have a fix on this, as you expect this type of functionality to be standard.

    opened by campbelldgunn 6
  • Performance of Reoccuring Events.

    Performance of Reoccuring Events.

    On an unmodified system, adding 4-5 new weekly reoccurring events then viewing the calendar view spikes CPU usage massively and takes several seconds to render the page. I think a more clean implementation of this could be based on persistence or utilizing the cache.

    It is also possible that I am doing something else to cause this performance problem, do other people find that reoccurring events scale fine?

    opened by kkubasik 4
  • Templates redundancy

    Templates redundancy

    After Wes' Pinax-related restructuring we have the same templates in two places - in /schedule/templates/schedule/ and /project_sample/templates/schedule/. Can we clean it up, or is there a reason to keep it like that?

    opened by bartekgorny 3
  • Discussion: Tables vs. Div's for daily view

    Discussion: Tables vs. Div's for daily view

    I'm curious why div's are now being used for the daily calendar display, instead of tables. There's a lot of style hacking going on, with absolute positioning, div sizes, etc., which makes it very difficult to customize the look of the calendars.

    For my site, I will be modifying the templates and view code to display tables, and was wondering if there was a strong reason for not doing this in the master app.

    Thanks, Pat

    opened by ptoal 3
  • occurrences_after() broken

    occurrences_after() broken

    I've noticed that occurences_after() is broken when there are no items in the calendar that are recurring events. I get the following error: AttributeError: 'tuple' object has no attribute 'event' (I had previously supplied a patch I thought fixed this, but it doesn't actually work. The use of all of these generators is making my head spin)

    Also, if you use occurrences_after() with recurring events, the generator happily creates occurrences for dates well beyond the end-date. I am also trying to track this issue down, but have been unsuccessful so far.

    yearns for the get_upcoming_events method

    opened by ptoal 3
  • ImportError: No module named _thread

    ImportError: No module named _thread

    I get the following traceback when I try to run django-admin.py syncdb for the first time. I'm using the project_sample provided.

    $ django-admin.py runserver 
    Validating models...
    
    Unhandled exception in thread started by <bound method Command.inner_run of <django.core.management.commands.runserver.Command object at 0x10d798550>>
    Traceback (most recent call last):
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 88, in inner_run
        self.validate(display_num_errors=True)
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/django/core/management/base.py", line 249, in validate
        num_errors = get_validation_errors(s, app)
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/django/core/management/validation.py", line 35, in get_validation_errors
        for (app_name, error) in get_app_errors().items():
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/django/db/models/loading.py", line 146, in get_app_errors
        self._populate()
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/django/db/models/loading.py", line 64, in _populate
        self.load_app(app_name)
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in load_app
        models = import_module('.models', app_name)
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
        __import__(name)
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/schedule/models/__init__.py", line 1, in <module>
        from schedule.models.calendars import *
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/schedule/models/calendars.py", line 11, in <module>
        from dateutil import rrule
      File "/Users/oconnor/.virtualenvs/django-schedule/lib/python2.7/site-packages/dateutil/rrule.py", line 13, in <module>
        import _thread
    ImportError: No module named _thread
    

    I have the following packages installed in a virtualenv:

    $ pip freeze
    BeautifulSoup==3.2.0
    Django==1.3.1
    django-appconf==0.4.1
    django-compressor==1.1
    django-debug-toolbar==0.8.5
    django-grappelli==2.3.5
    django-schedule==0.5b
    docutils==0.8.1
    ipdb==0.6.1
    ipython==0.11
    pep8==0.6.1
    pyflakes==0.5.0
    python-dateutil==2.0
    vobject==0.8.1c
    wsgiref==0.1.2
    

    I'm using Python 2.7.1 on my MBP which has 10.7.2 installed.

    opened by epicserve 2
  • install issue: no such table: schedule_calendar

    install issue: no such table: schedule_calendar

    running Python 2.6, Django 1.1 ran setup.py install, installed dateutil Got the django-schedule welcome screen but when click on link 'The list of available Calendars' I get error :

    TemplateSyntaxError at /schedule/ Caught an exception while rendering: no such table: schedule_calendarRequest Method: GET Request URL: http://127.0.0.1:8000/schedule/ Exception Type: TemplateSyntaxError Exception Value: Caught an exception while rendering: no such table: schedule_calendar Exception Location: C:\Python26\lib\site-packages\django\template\debug.py in render_node, line 81 Python Executable: C:\Python26\python.exe Python Version: 2.6.4 Python Path: ['c:\dateapp\apps\django-schedule\project_sample', 'C:\Python26\lib\site-packages\html5lib-0.90-py2.6.egg', 'C:\Python26\lib\site-packages\django_page_cms-1.1.1-py2.6.egg', 'C:\Python26\lib\site-packages\django_cms-2.0.2-py2.6.egg', 'C:\Python26\lib\site-packages\django_admin_tools-0.2.0-py2.6.egg', 'C:\Python26\lib\site-packages\django_friends-0.1.5-py2.6.egg', 'C:\Python26\lib\site-packages\django_schedule-0.1.0-py2.6.egg', 'C:\Python26\lib\site-packages\python_dateutil-1.5-py2.6.egg', 'C:\Windows\system32\python26.zip', 'C:\Python26\DLLs', 'C:\Python26\lib', 'C:\Python26\lib\plat-win', 'C:\Python26\lib\lib-tk', 'C:\Python26', 'C:\Python26\lib\site-packages', 'C:\Python26\lib\site-packages\PIL', 'c:\python26\lib\site-packages'] Server time: Fri, 23 Apr 2010 13:10:28 +0100

    opened by justinjools 2
  • Period event occurrences not sorted

    Period event occurrences not sorted

    Hi,

    I am trying to sort event occurrences by date descending.

    The following works fine for Events along:

    groupevents = Event.objects.filter(group = group_id).order_by('-start')

    But when I use the above to instantiate a Period, I always get teh events in date ascending order.

    group_events = []
    groupPeriodEvents = Period(Event.objects.filter(group = group_id).order_by('-start'), startdate, enddate)
    
    occurrences = groupPeriodEvents.occurrences 
    
    for event_occurrence in occurrences:       
        #Add all the groups events
        #print event_occurrence.start
        group_events.append(event_occurrence)
    

    Am I doing something wrong, or is this a bug?

    Thanks

    opened by camtechnet 2
  • 1.1 alpha - canceled occurrence chokes scheduletags.py in daily view

    1.1 alpha - canceled occurrence chokes scheduletags.py in daily view

    I ran into a few missing occurrence attributes after canceling an occurrence in alpha 1.1, the issue comes up in daily view. Digging into the code the two missing attributes on the occurrence were 'data' and 'level'. Looks like some display logic is throwing it. I put some hasattr checks in, but only because I don't understand the template tag well enough to know whereabouts it should bail out on the canceled occurrence.

    AttributeError at /schedule/calendar/daily/default/ 'Occurrence' object has no attribute 'data'

    scheduletags.py line 246 o.cls = o.data['class'] scheduletags.py line 253 o.left = w * o.level

    opened by pragmar 2
  • Signals - Feature request

    Signals - Feature request

    It would be nice to add signals on event creation, and in some other major points

    I've added signals for event creation/update in my fork. But I feel that it should be done in some systematic manner. I can devote some time to go though django-schedule so it will send signals in other major points (event deletion, occurrences crate/update/delete, etc).

    In my case I needed to catch event_created to re-post created event into other calendars, and couldn't find the way to do it without rewriting the whole 'create_or_edit_event' view.

    opened by zen4ever 2
  • Default settings.py will cause template tag KeyError: ‘request’ error

    Default settings.py will cause template tag KeyError: ‘request’ error

    It's also worth noting that the daily_table template tag won't work without django.core.context_processors.request being in your TEMPLATE_CONTEXT_PROCESSORS in settings.py. django.core.context_processors.request is not included by default.

    opened by jheasly 2
  • NoArgsCommand is deprecated, use BaseCommand instead.

    NoArgsCommand is deprecated, use BaseCommand instead.

    The load_sample_data and load_example_data can't run on Django 1.10 because the NoArgsCommand was deprecated. Using BaseCommand and using the new handle function will fix it.

    opened by luisehk 0
  • How would we go about creating oncall rotating schedule using this?

    How would we go about creating oncall rotating schedule using this?

    I would like to create oncall rotating schedule using this by adding some new functionality in the tool so that it would be possible to create oncall rotating schedule for team members in on page rather than have to create multiple events using the new event form. Could you help me with some pointers on how would I be able to achieve that?

    opened by sushovan23 0
  • `ImportError: cannot import name execute_manager`

    `ImportError: cannot import name execute_manager`

    When attempting to try the stable version as per the wiki:

    % python manage.py syncdb
    Traceback (most recent call last):
      File "manage.py", line 2, in <module>
        from django.core.management import execute_manager
    ImportError: cannot import name execute_manager
    

    execute_manager is deprecated in newer versions of Django.

    opened by eddie-dunn 1
Owner
Tony Hauber
Tony Hauber
Django project starter on steroids: quickly create a Django app AND generate source code for data models + REST/GraphQL APIs (the generated code is auto-linted and has 100% test coverage).

Create Django App ?? We're a Django project starter on steroids! One-line command to create a Django app with all the dependencies auto-installed AND

imagine.ai 68 Oct 19, 2022
Django-shared-app-isolated-databases-example - Django - Shared App & Isolated Databases

Django - Shared App & Isolated Databases An app that demonstrates the implementa

Ajai Danial 5 Jun 27, 2022
Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project

Django URL Shortener Django URL Shortener is a Django app to to include URL Shortening feature in your Django Project Install this package to your Dja

Rishav Sinha 4 Nov 18, 2021
Django CacheMiddleware has a multi-threading issue with pylibmc

django-pylibmc-bug Django CacheMiddleware has a multi-threading issue with pylibmc. CacheMiddleware shares a thread-unsafe cache object with many thre

Iuri de Silvio 1 Oct 19, 2022
APIs for a Chat app. Written with Django Rest framework and Django channels.

ChatAPI APIs for a Chat app. Written with Django Rest framework and Django channels. The documentation for the http end points can be found here This

Victor Aderibigbe 18 Sep 9, 2022
Django-Audiofield is a simple app that allows Audio files upload, management and conversion to different audio format (mp3, wav & ogg), which also makes it easy to play audio files into your Django application.

Django-Audiofield Description: Django Audio Management Tools Maintainer: Areski Contributors: list of contributors Django-Audiofield is a simple app t

Areski Belaid 167 Nov 10, 2022
A Django app to initialize Sentry client for your Django applications

Dj_sentry This Django application intialize Sentry SDK to your Django application. How to install You can install this packaging by using: pip install

Gandi 1 Dec 9, 2021
django-quill-editor makes Quill.js easy to use on Django Forms and admin sites

django-quill-editor django-quill-editor makes Quill.js easy to use on Django Forms and admin sites No configuration required for static files! The ent

lhy 139 Dec 5, 2022
A simple demonstration of how a django-based website can be set up for local development with microk8s

Django with MicroK8s Start Building Your Project This project provides a Django web app running as a single node Kubernetes cluster in microk8s. It is

Noah Jacobson 19 Oct 22, 2022
Basic Form Web Development using Python, Django and CSS

thebookrain Basic Form Web Development using Python, Django and CSS This is a basic project that contains two forms - borrow and donate. The form data

Ananya Dhulipala 1 Nov 27, 2021
Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

django-cors-headers A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django a

Adam Johnson 4.8k Jan 3, 2023
django-tables2 - An app for creating HTML tables

django-tables2 - An app for creating HTML tables django-tables2 simplifies the task of turning sets of data into HTML tables. It has native support fo

Jan Pieter Waagmeester 1.6k Jan 3, 2023
A simple app that provides django integration for RQ (Redis Queue)

Django-RQ Django integration with RQ, a Redis based Python queuing library. Django-RQ is a simple app that allows you to configure your queues in djan

RQ 1.6k Jan 6, 2023
A Django app for managing robots.txt files following the robots exclusion protocol

Django Robots This is a basic Django application to manage robots.txt files following the robots exclusion protocol, complementing the Django Sitemap

Jazzband 406 Dec 26, 2022
Yet another Django audit log app, hopefully the simplest one.

django-easy-audit Yet another Django audit log app, hopefully the easiest one. This app allows you to keep track of every action taken by your users.

Natán 510 Jan 2, 2023
A Django app to accept payments from various payment processors via Pluggable backends.

Django-Merchant Django-Merchant is a django application that enables you to use multiple payment processors from a single API. Gateways Following gate

Agiliq 997 Dec 24, 2022
Django app for building dashboards using raw SQL queries

django-sql-dashboard Django app for building dashboards using raw SQL queries Brings a useful subset of Datasette to Django. Currently only works with

Simon Willison 383 Jan 6, 2023
This is a Django app that uses numerous Google APIs such as reCAPTURE, maps and waypoints

Django project that uses Googles APIs to auto populate fields, display maps and routes for multiple waypoints

Bobby Stearman 57 Dec 3, 2022
The best way to have DRY Django forms. The app provides a tag and filter that lets you quickly render forms in a div format while providing an enormous amount of capability to configure and control the rendered HTML.

django-crispy-forms The best way to have Django DRY forms. Build programmatic reusable layouts out of components, having full control of the rendered

null 4.6k Jan 7, 2023