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
A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel

Features Python 2.7, 3.4, Django 2.0+ support (Django 1.11 (LTS), is supported until django-autocomplete-light-3.2.10), Django (multiple) choice suppo

YourLabs 1.7k Jan 1, 2023
A fresh approach to autocomplete implementations, specially for Django. Status: v3 stable, 2.x.x stable, 1.x.x deprecated. Please DO regularely ping us with your link at #yourlabs IRC channel

Features Python 2.7, 3.4, Django 2.0+ support (Django 1.11 (LTS), is supported until django-autocomplete-light-3.2.10), Django (multiple) choice suppo

YourLabs 1.7k Jan 1, 2023
Stable Neural ODE with Lyapunov-Stable Equilibrium Points for Defending Against Adversarial Attacks

Stable Neural ODE with Lyapunov-Stable Equilibrium Points for Defending Against Adversarial Attacks Stable Neural ODE with Lyapunov-Stable Equilibrium

Kang Qiyu 8 Dec 12, 2022
MoinMoin Wiki Development (2.0+), unstable, for production please use 1.9.x.

MoinMoin - a wiki engine in Python MoinMoin is an easy to use, full-featured and extensible wiki software package written in Python. It can fulfill a

MoinMoin Wiki Engine 240 Dec 22, 2022
This Code is Property of Rehyann Saini. Feel Free to use this Project.

Email-Spammer Rehyann Saini in Collabration With Fe13 Productions This is an easy to use Dev Friendly Email spammer... #Important Things to know..! St

Rehyann Saini 1 Jan 14, 2022
Words_And_Phrases - Just a repo for useful words and phrases that might come handy in some scenarios. Feel free to add yours

Words_And_Phrases Just a repo for useful words and phrases that might come handy in some scenarios. Feel free to add yours Abbreviations Abbreviation

Subhadeep Mandal 1 Feb 1, 2022
This is a very simple botnet with a CnC server, made by me. Feel free to change anything

This is a very simple botnet with a CnC server, made by me. Feel free to change anything

null 8 Nov 12, 2022
:electric_plug: Generating short urls with python has never been easier

pyshorteners A simple URL shortening API wrapper Python library. Installing pip install pyshorteners Documentation https://pyshorteners.readthedocs.i

Ellison 350 Dec 24, 2022
:electric_plug: Generating short urls with python has never been easier

pyshorteners A simple URL shortening API wrapper Python library. Installing pip install pyshorteners Documentation https://pyshorteners.readthedocs.i

Ellison 351 Jan 3, 2023
This is a rip off of the classical iPhone Calculator . This project has been made with PyQT5

iPhoneCalcRIP-OFF This is a rip off of the classical iPhone Calculator . This project has been made with PyQT5

Juss Patel 7 May 1, 2022
The sequel to SquidNet. It has many of the previous features that were in the original script, however a lot of the functions that do not serve much functionality have been removed.

SquidNet2 The sequel to SquidNet. It has many of the previous features that were in the original script, however a lot of the functions that do not se

DrSquidX 5 Mar 25, 2022
On the 11/11/21 the apache 2.4.49-2.4.50 remote command execution POC has been published online and this is a loader so that you can mass exploit servers using this.

ApacheRCE ApacheRCE is a small little python script that will allow you to input the apache version 2.4.49-2.4.50 and then input a list of ip addresse

null 3 Dec 4, 2022
This script has been created in order to find what are the most common demanded technologies in Data Engineering field.

This is a Python script that given a whole corpus of job descriptions and a file with keywords it extracts the number of number of ocurrences of these keywords and write it to a file. This script it is easy to extend to accept more functionalities

Antonio Bri Pérez 0 Jul 17, 2022
A simple projects to help your seo optimizing has been written with python

python-seo-projects it is a very simple projects to help your seo optimizing has been written with python broken link checker with python(it will give

Amirmohammad Razmy 3 Dec 25, 2021
This program has been coded to allow the user to rename all the files in the entered folder.

Bulk_File_Renamer This program has been coded to allow the user to rename all the files in the entered folder. The only required package is "termcolor

null 1 Jan 6, 2022
This is a key logger based in python which when executed records all the keystrokes of the system it has been executed on .

This is a key logger based in python which when executed records all the keystrokes of the system it has been executed on

Purbayan Majumder 0 Mar 28, 2022
WrightEagle AutoTest (Has been updated by Cyrus team members)

Autotest2d WrightEagle AutoTest (Has been updated by Cyrus team members) Thanks go to WrightEagle Members. Steps 1- prepare start_team file. In this s

Cyrus Soccer Simulation 2D Team 3 Sep 1, 2022