##// END OF EJS Templates
Serialize timestamp before passing to tag. Fail if the passed timestamp is invalid and cannot be parsed
Serialize timestamp before passing to tag. Fail if the passed timestamp is invalid and cannot be parsed

File last commit:

r1986:0b41439a default
r2122:edce8526 default
Show More
banner.py
13 lines | 335 B | text/x-python | PythonLexer
from django.db import models
class Banner(models.Model):
title = models.TextField()
text = models.TextField(blank=True, null=True)
post = models.ForeignKey('Post', on_delete=models.CASCADE)
def __str__(self):
return self.title
def get_text(self) -> str:
return self.text or self.post.get_text()