Tags » Supermario

How to get Id value in jquery ajax response?

In a Django app, I’d like to get ID value (cid) passed into this template:

the views.py

def like_piccomment(request, cid):
    if request.method == 'POST':
        the_comment = PicComment.objects.get(id= cid) 
        the_photo = the_comment.pic
        who_liked = request.user.id

        if PicCommentLike.objects.filter(liker=who_liked, liked=cid):
            the_comment.likes -=1
            the_comment.save()
            PicCommentLike.objects.filter(liker=who_liked, liked=cid).delete()
            #return render_to_response('userpics/likes.html', args)
        else:

            the_comment.likes +=1
            the_comment.save()
            newliker = PicCommentLike(liker=who_liked, liked=cid)
            newliker.save()

    args = {}
    args.update(csrf(request))
    args['likes'] = the_comment.likes
    args['cid'] = cid
    return render_to_response('userpics/likes.html', args)  
… 130 more words
Recent Questions - Stack Overflow

Super Mario

Was using a new pixelart program for this one. GraphicsGale. Was a lot of fun to use and i managed to get this done far quicker than my previous works in GIMP. 9 more words

Video Games

Super Mario turns out as An Asshole In Real Life.

his brother Luigi turns out  is just as bad as him.

Video

Digital Game

Digital game

Here am I, again, lost in the crossroads of modern technology. And again my thoughts are dubious: I acknowledge the enormous potential of digital games, yet I feel frightened and clumsy when trying to employ digital games in my classroom. 232 more words