functional filter + add modal
This commit is contained in:
@ -101,14 +101,23 @@ class Ticket(models.Model):
|
||||
def clean_description(self):
|
||||
cleaned_description = bleach.clean(
|
||||
self.description,
|
||||
tags=['b', 'i', 'u', 'p', 'br', 'a', 'h3', 'h4', 'h5', 'h6'],
|
||||
tags=[
|
||||
'b', 'i', 'u', 'p', 'br', 'a', 'h3', 'h4', 'h5', 'h6', 'strong',
|
||||
'figure', 'table', 'tbody', 'tr', 'td'
|
||||
],
|
||||
attributes={'a': ['href', 'title']}
|
||||
)
|
||||
return cleaned_description
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.description = self.clean_description()
|
||||
# self.edit_timestamp = timezone.now() ## TEMP COMMENT, UNCOMMENT LATER !!
|
||||
|
||||
# we must use the same datetime object, otherwise they wont match
|
||||
now = timezone.now()
|
||||
|
||||
if self._state.adding: self.create_timestamp = now
|
||||
self.edit_timestamp = now
|
||||
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user