From f9eb4681807c56b9dd67ed370e032e77f9219bf2 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 10 Feb 2020 17:04:35 +0530 Subject: Change models.py and admin.py - Register course status model in admin - Add object str name in CourseStatus model - Add filter in the admin for filtering courses --- yaksh/models.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'yaksh/models.py') diff --git a/yaksh/models.py b/yaksh/models.py index 6edb9ea..d453f81 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1161,6 +1161,9 @@ class CourseStatus(models.Model): self.current_unit = unit self.save() + def __str__(self): + return "{0} status for {1}".format(self.course.name, self.user.username) + ############################################################################### class ConcurrentUser(models.Model): -- cgit From 6c7325350471bcf7437fcc7f08debe19bd0365eb Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 10 Feb 2020 17:10:22 +0530 Subject: Fix pep8 issues --- yaksh/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'yaksh/models.py') diff --git a/yaksh/models.py b/yaksh/models.py index d453f81..df37b26 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1162,7 +1162,9 @@ class CourseStatus(models.Model): self.save() def __str__(self): - return "{0} status for {1}".format(self.course.name, self.user.username) + return "{0} status for {1}".format( + self.course.name, self.user.username + ) ############################################################################### -- cgit