Permalink
Browse files

Added recurring schedule field to course

  • Loading branch information...
1 parent efc8a34 commit ed852dc244960749b5e6477b3e5c60a6f210a8e9 @emperorcezar emperorcezar committed Mar 29, 2012
Showing with 7 additions and 2 deletions.
  1. +6 −2 apps/courses/models.py
  2. +1 −0 settings/common.py
View
@@ -1,9 +1,12 @@
import datetime
from django.db import models
-from djangotoolbox import fields
-from libs.utils.fields import ForeignKey
from django.contrib.auth.models import Group, User
+
+from djangotoolbox import fields
from tinymce import models as tinymce_models
+import recurrence.fields
+
+from libs.utils.fields import ForeignKey
class Semester(models.Model):
name = models.CharField(max_length = 200)
@@ -32,6 +35,7 @@ class Course(models.Model):
faculty = fields.ListField(ForeignKey(User, related_name = 'faculty'))
private = models.BooleanField(default=False, blank=True)
members = fields.ListField(ForeignKey(User, related_name = 'members'))
+ schedule = recurrence.fields.RecurrenceField()
def __unicode__(self):
return "%s: %s %s" % (self.title, self.semester.name, self.semester.year)
View
@@ -98,6 +98,7 @@
'compressor',
'djcelery',
'mptt',
+ 'recurrence',
# Local apps

0 comments on commit ed852dc

Please sign in to comment.