I tried on google but I did not found the solution. In Django
admin side, I'm displaying start date and end date with time. But time is in 24 hr
format and I want to display it in 12 hr
format
class CompanyEvent(models.Model):
title = models.CharField(max_length=255)
date_start = models.DateTimeField('Start Date')
date_end = models.DateTimeField('End Date')
notes = models.CharField(max_length=255)
class Meta:
verbose_name = u'Company Event'
verbose_name_plural = u'Company Events'
def __unicode__(self):
return "%s (%s : %s)" % (self.title, self.date_start.strftime('%m/%d/%Y'), self.date_end)
I also found out this but it isn't helping me.
I am new to python
and django
. Please help.