From ce02b277f90038d975e96879afabc4aaa6fbe167 Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 28 Nov 2017 12:29:24 +0530 Subject: Add comments in lesson model and remove unwanted method --- yaksh/models.py | 10 +++++++--- 1 file 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) -- cgit