def render(self, context): if self.date: date=self.date.resolve(context) else: date=datetime.datetime.now() d= miladi2shamsi(date.month, date.day, date.year) return to_persian_num(d[2], 4)+"/"+to_persian_num(d[0])+"/"+to_persian_num(d[1])
def render(self, context): date=self.date.resolve(context) return to_persian_num(date.hour, 2)+":"+to_persian_num(date.minute)+":"+to_persian_num(date.second)