def message_context(request): # only posts are valid if request.method != 'POST': raise Http404 message = request.POST.get('message', None) if not message: raise Http404 p = Pipeline() context = p.run(message) print context return JsonResponse(context)
def test_pipeline_postrank(self): print "\n\n\n\n\n\n" p = Pipeline() msg = "http://www.igvita.com/2011/04/07/life-beyond-http-11-googles-spdy/" output = p.run(msg) print output
def test_pipeline_pixmatch(self): print "\n\n\n\n\n\n" p = Pipeline() msg = "http://dev:8000/site-media/static/images/memes/HACKWATERLOO-Y-U-NO-ENJOY-SUNLIGHT.jpg" output = p.run(msg) print output