Add last_updated field to Thoughts
This commit is contained in:
parent
d4e10810f8
commit
43abe234fb
|
@ -19,9 +19,11 @@ class Thought(models.Model):
|
|||
media = models.FileField(upload_to="", blank=True) # A single image, video, or sound clip per post
|
||||
media_alt = models.TextField(blank=True) # An optional transcription of the Thought's media
|
||||
html_content = models.TextField(blank=True) # The rendered text for this thought
|
||||
last_updated = models.DateTimeField(default=timezone.now)
|
||||
|
||||
def save(self):
|
||||
self.update_html_content(commit=False)
|
||||
self.last_updated = timezone.now()
|
||||
super().save()
|
||||
|
||||
def get_media_type(self):
|
||||
|
|
Loading…
Reference in New Issue