Ejemplo n.º 1
0
def index():

    if current_user.is_authenticated:

        share_data.getportfoliovalues(current_user.username)

        return render_template('index.html', shares=share_data.getalljsonshares(current_user.username), portfolioids=Userownedshare.listportfolios())

    else: return render_template('index.html')
Ejemplo n.º 2
0
def sharedata():
    js = share_data.getalljsonshares(current_user.username)
    io = StringIO()
    #return json.dumps(js, io)
    data= json.dumps(js, io)

    if current_user.is_authenticated:

        return render_template('sharedata.html', data=share_data.getalljsonshares(current_user.username),
                                portfoliovalues= share_data.getportfoliovalues(current_user.username))