def update_data(self): now = timezone.localtime(timezone.now(), self.timezone) self.time = formats.time_format(now, 'TIME_FORMAT') self.date = formats.date_format(now, 'SHORT_DATE_FORMAT') self.save()