Create Author mixin

This commit is contained in:
Ross
2024-02-05 09:34:47 +00:00
parent 1e16386e1e
commit 9e06cb45ca
5 changed files with 35 additions and 59 deletions
-10
View File
@@ -136,16 +136,6 @@ class Long(QuestionBase):
def get_absolute_url(self):
return reverse("longs:question_detail", kwargs={"pk": self.pk})
def get_authors(self):
"""Returns a comma seperated text list of authors"""
authors = ", ".join([i.username for i in self.author.all()])
return authors
def get_author_objects(self):
"""Returns a comma seperated text list of authors"""
authors = [i for i in self.author.all()]
return authors
def __str__(self):
return "{} / {}".format(self.pk, self.description)
examinations = [series.get_examination() for series in self.series.all()]