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
-5
View File
@@ -229,11 +229,6 @@ class Rapid(QuestionBase):
def get_absolute_url(self):
return reverse("rapids: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_regions(self):
"""Returns a comma seperated text list of regions"""
regions = ", ".join([i.name for i in self.region.all()])