def pay_text(self): print self.pay_period, gettext(self.pay_period), self.pay_amount print gettext(self.pay_period) % self.pay_amount return (gettext(self.pay_period) % self.pay_amount) + '원'
def get_prep_value(self, value): try: return models.IntegerField.get_prep_value(self, value) except: raise ValidationError({self.name : [gettext('%s should be a number.') % gettext(self.verbose_name)]})
def location_text(self): if self.location_type == 'local': return gettext(self.location_type) % self.location else: return gettext(self.location_type)