summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authoradityacp2017-11-28 12:29:24 +0530
committeradityacp2017-11-28 12:29:24 +0530
commitce02b277f90038d975e96879afabc4aaa6fbe167 (patch)
treea77cf1a3ea31b90c112de2fb235b9ac1a99e9d12 /yaksh/models.py
parentd9502c091fec7671bfe31cd655f9fe3f07b8899c (diff)
downloadonline_test-ce02b277f90038d975e96879afabc4aaa6fbe167.tar.gz
online_test-ce02b277f90038d975e96879afabc4aaa6fbe167.tar.bz2
online_test-ce02b277f90038d975e96879afabc4aaa6fbe167.zip
Add comments in lesson model and remove unwanted method
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index d29a286..53c24f6 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -143,13 +143,17 @@ class CourseManager(models.Manager):
#############################################################################
class Lesson(models.Model):
+ # Lesson name
name = models.CharField(max_length=255)
+
+ # Markdown text of lesson content
description = models.TextField()
+
+ # Markdown text should be in html format
html_data = models.TextField(null=True, blank=True)
- creator = models.ForeignKey(User)
- def get_files(self):
- return LessonFile.objects.filter(lesson=self)
+ # Creator of the lesson
+ creator = models.ForeignKey(User)
def __str__(self):
return "{0}".format(self.name)