Change Date format in Django model
问题 I have a date field called "birthdate" and property called "lifespan" in a django model. Field birthdate = models.DateField(blank=True, null=True) Property @property def lifespan(self): return '%s - present' % self.birthdate Currently lifespan returns the date in the "yyyy-mm-dd" format. How can I changed this date format to "mm/dd/yyyy"? I know how to do it in a django template with a filter but wanted to see if there was a similar "filter" that I can use in a Django model. I appreciate the