summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 856698f..9b92791 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -70,7 +70,7 @@ class Course(models.Model):
students = models.ManyToManyField(User, related_name='students')
requests = models.ManyToManyField(User, related_name='requests')
rejected = models.ManyToManyField(User, related_name='rejected')
- created_on = models.DateTimeField(default=datetime.now())
+ created_on = models.DateTimeField(auto_now_add=True)
def request(self, *users):
self.requests.add(*users)