Skip to content

Commit

Permalink
Merge pull request #13 from libraM/master
Browse files Browse the repository at this point in the history
dateutil's homepage URL fix & enhanced example_project
  • Loading branch information
maiksprenger committed Apr 6, 2012
2 parents 4cb1118 + 27b6cb9 commit 5b4447d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -72,4 +72,4 @@ Dependencies
------------

* [vObject](http://vobject.skyhouseconsulting.com/)
* [dateutil](http://http://labix.org/python-dateutil)
* [dateutil](http://labix.org/python-dateutil/)
16 changes: 12 additions & 4 deletions example_project/testapp/views.py
@@ -1,7 +1,7 @@
# Create your views here.
import datetime
import django_cal
from django_cal.views import Events
import dateutil.rrule as rrule

class Testevents(Events):
def items(self):
Expand All @@ -13,11 +13,19 @@ def cal_name(self):
def cal_desc(self):
return "Lorem ipsum tralalala."

def item_summary(self):
def item_summary(self, item):
return "That was suchaday!"

def item_start(self):
def item_start(self, item):
return datetime.date(year=2011, month=1, day=24)

def item_end(self):
def item_end(self, item):
return datetime.date(year=2011, month=1, day=26)

def item_rruleset(self, item):
rruleset = rrule.rruleset()
rruleset.rrule(rrule.YEARLY, count=10, dtstart=self.item_start(item))
return rruleset

def item_categories(self, item):
return ["Family", "Birthdays"]

0 comments on commit 5b4447d

Please sign in to comment.