Display and filter authors on index pages

This commit is contained in:
Ross
2023-02-20 14:10:51 +00:00
parent fc40aacd22
commit b14b1c20bd
3 changed files with 35 additions and 20 deletions
+2
View File
@@ -203,6 +203,8 @@ class ExamBase(models.Model):
def get_authors(self):
"""Returns a comma seperated text list of authors"""
authors = ", ".join([i.username for i in self.author.all()])
if not authors:
return "None"
return authors
def get_author_objects(self):