示例#1
0
文件: models.py 项目: ecolemo/devjobs
 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) + '원'
示例#2
0
文件: models.py 项目: ecolemo/devjobs
 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)]})
示例#3
0
文件: models.py 项目: ecolemo/devjobs
 def location_text(self):
     if self.location_type == 'local':
         return gettext(self.location_type) % self.location
     else:
         return gettext(self.location_type)