示例#1
0
def createBlackmail(request, target, owner, picture, deadline):
    b = Blackmail()
    b.target = target
    b.owner = owner
    b.picture = picture
    b.deadline = deadline
    b.timecreated = str(datetime.datetime.now())
    b.demandsmet = False
    b.save()
    return b
示例#2
0
def createBlackmail(request, target, owner, picture, deadline, demands):
    b = Blackmail()
    b.target = target
    b.owner = owner
    b.picture = picture
    b.deadline = deadline
    b.timecreated = str(datetime.datetime.now())
    b.demandsmet = False
    
    t = Term()
    t.blackmail = b
    t.demand = demands

    b.save()
    t.save()