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 ) )