I have data that is in json format from the database, i want to draw a
graph with data but i'm not sure how to display it in my view in graph
format using the plotly library. My view code display nothing!
*CONTROLLER*
def dashboard():
call_clicks = db().select(db.dashboard.call_clicks)
s
Just in case it helps someone, I was able to change my code to make it
work. It's not a complete solution: I just started using args instead of
vars.
I'll explain: in the client I was calling the service with some query
string arguments, like this:
from gluon.contrib.simplejsonrpc import Server
Like I said I didn't test it :) apparently you need to seek to zero after
tesseract and not after image.open as tesseract is reading it. Fixed
version (which I actually tested):
# -*- coding: utf-8 -*-
import pytesseract
from PIL import Image
from pydal.validators import Validator, ValidationErr
The problem is that you are creating the string you want to return and then
putting it in a dictionary. You could just have returned the string. That
said it's better to use response.json which does a few other things for you.
Try this
def dashboard():
call_clicks = db().select(db.dashboard
4 matches
Mail list logo