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
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()