jones-dev #19
@ -103,6 +103,12 @@ class Ticket(models.Model):
|
||||
)
|
||||
return cleaned_description
|
||||
|
||||
def short_description(self):
|
||||
"""Provide a snippet of the description for presentation purposes."""
|
||||
|
||||
short_description = bleach.clean(self.description, tags=[])[:150]
|
||||
return f"{short_description}..."
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
"""Override the save method to clean the description and apply timestamps."""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user