diff options
author | prathamesh | 2017-12-05 19:38:21 +0530 |
---|---|---|
committer | prathamesh | 2017-12-05 19:38:21 +0530 |
commit | d33e622b8790d81c80eea2305ab7a2989c21b156 (patch) | |
tree | 9dc3d84df3f955a200f7182ed9d0067e8c138f5f /yaksh/models.py | |
parent | 06cc3dc5d3671ca24fc412b6078906a582b83e98 (diff) | |
parent | d2eb978e3ca51914b16655403bd74cc84d4eab28 (diff) | |
download | online_test-d33e622b8790d81c80eea2305ab7a2989c21b156.tar.gz online_test-d33e622b8790d81c80eea2305ab7a2989c21b156.tar.bz2 online_test-d33e622b8790d81c80eea2305ab7a2989c21b156.zip |
Merge branch 'yaksh_video_lessons' of https://github.com/FOSSEE/online_test into yaksh_video_lessons
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 463434b..c65e9ef 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) |