Пример #1
0
def portfolio_asset(portfolio_id=None):
    user = User.get_by_email(session['email'])

    portfolio = user.get_portfolio()
    portfolio = Portfolio.from_mongo(portfolio_id)
    asset = portfolio.get_asset()

    return render_template('Aasset.html', posts=posts, portfolio_title=portfolio.title, portfolio_id=portfolio._id)
Пример #2
0
 def new_asset(portfolio_id, asset_name,
               asset_weight):  #, date=datetime.datetime.utcnow()):
     portfolio = Portfolio.from_mongo(portfolio_id)
     portfolio.new_asset(asset_name=asset_name, asset_weight=asset_weight)