Ejemplo n.º 1
0
 def post( self, request, slug ):
     portfolio = Portfolio( slug )
     symbol = request.POST.get( 'symbol', None )
     amount = request.POST.get( 'amount', None )
     if portfolio.remove_holding( symbol, amount ):
         return redirect( '/portfolio/{}/manage'.format( slug ) )
     else:
         return redirect( '/portfolio/{}/manage'.format( slug ) )