hongtaocai / googlefinance

Python module to get real-time stock data from Google Finance API
MIT License
700 stars 172 forks source link

Bug working with Django #5

Closed wynnsu closed 8 years ago

wynnsu commented 8 years ago

In Django view: google2 Result: google When calling getQuotes() with object attribute (stock.symbol), the function returns the result of getQuotes('G') which should be getQuotes('GOOG'). Same thing with 'FB', 'AAPL' etc. Only the last letter was passed.

google3 google4

hongtaocai commented 8 years ago

It would be great if you could print out the stock.symbol variable before the append statement and the if statement. If stock.symbol is indeed just 'G', perhaps the package is fine and your django program ignores the previous part of the string.

wynnsu commented 8 years ago

The 'Symbol' column in Review screenshot is the value of stock.symbol. And that appears to be 'GOOG'.

wynnsu commented 8 years ago

Hi hongtaocai,

Problem solved by using str() function. Still don't know where it went wrong but thanks all the same:) image