def snipt_page(request, user, snipt_id):
    try:
        snipt = Snippet.objects.get(slug=snipt_id)
        if request.GET in 'c':
            return HttpResponseRedirect(snipt.get_absolute_url() + '#comment-' + request.GET['c'])
    except:
        return HttpResponseRedirect('/' + user + '/tag/' + snipt_id)
    context_user = User.objects.get(id=snipt.user.id)
    
    if request.user.id == context_user.id:
        mine = True
    else:
        mine = False
    
    if not snipt.public and not mine:
        try:
            if request.GET['key'] != snipt.key:
                raise Http404()
            else:
                key = True
        except:
            raise Http404()
    
    disable_wrap = request.session.get('disable_wrap')
    disable_message = request.session.get('disable_message')
    
    return render_to_response('snipt.html', locals(), context_instance=RequestContext(request))
dataset/ETHPy150Open nicksergeant/snipt-old/views.py/snipt_page/swapped operands of `in`