def getScreenshotWebsiteMovil (request): htmltoimage = HtmltoImage() data = {'valor':{'smartphone':'N/N','tablet':'N/N'}, 'paso': 1} try: #self.session = Session() #dominio = self.session['dominio'] #dominio = request.session['dominio'] dominio = dominio_global data['valor']['smartphone'] = htmltoimage.getImage(dominio, '479', '320', 'smartphone') data['valor']['tablet'] = htmltoimage.getImage(dominio, '766', '1025', 'tablet') return HttpResponse(json.dumps(data), content_type="application/json") except Exception as e: print str(e) return redirect('/')
def getScreenshotWebsite(request): htmltoimage = HtmltoImage() data = {'valor': 'N/N', 'paso': 1} #try: #self.session = Session() #dominio = self.session['dominio'] #dominio = request.session['dominio'] dominio = dominio_global data['valor'] = htmltoimage.getImage(dominio, '681', '1366') return HttpResponse(json.dumps(data), content_type="application/json")
def getScreenshotWebsite (request): htmltoimage = HtmltoImage() data = {'valor':'N/N', 'paso': 1} #try: #self.session = Session() #dominio = self.session['dominio'] #dominio = request.session['dominio'] dominio = dominio_global data['valor'] = htmltoimage.getImage(dominio, '681', '1366') return HttpResponse(json.dumps(data), content_type="application/json")
def getScreenshotWebsiteMovil(request): htmltoimage = HtmltoImage() data = {'valor': {'smartphone': 'N/N', 'tablet': 'N/N'}, 'paso': 1} try: #self.session = Session() #dominio = self.session['dominio'] #dominio = request.session['dominio'] dominio = dominio_global data['valor']['smartphone'] = htmltoimage.getImage( dominio, '479', '320', 'smartphone') data['valor']['tablet'] = htmltoimage.getImage(dominio, '766', '1025', 'tablet') return HttpResponse(json.dumps(data), content_type="application/json") except Exception as e: print str(e) return redirect('/')