示例#1
0
def pay(user, service, value, cost):
    record = Record()
    record.date = date.today()
    record.user = user
    record.service = service
    record.value = value
    record.cost = cost
    record.save()
示例#2
0
文件: tools.py 项目: ghostmod/pcp
def pay(user, service, value, cost):
    record = Record()
    record.date = date.today()
    record.user = user
    record.service = service
    record.value = value
    record.cost = cost
    record.save()
示例#3
0
 def _record(self, service, value, cost=0):
     record = Record()
     record.date = date.today()
     record.user = self.user
     record.service = service
     record.value = value
     record.cost = cost
     try:
         record.save()
     except RecordExists:
         pass
示例#4
0
 def _record(self, service, value, cost=0):
     record = Record()
     record.date = date.today()
     record.user = self.user
     record.service = service
     record.value = value
     record.cost = cost
     try:
         record.save()
     except RecordExists:
         pass