Exemplo n.º 1
0
def saveComment(comment,uid1,wid1):
    c=Comment()
    co=comment
    w=website.objects.get(id=wid1)
    u=User.objects.get(id=uid1)
    c.coment=comment
    c.webid=w
    c.user_id=u
    pp=polarity_comment(co)
    c.polar=pp
    c.rating=comment_rating(pp)
    c.save()