Here is my view:
def data(request, symbol): context_dict = {} NASDAQ = "http://www.nasdaq.com/symbol/{}/financials?query=income-statement".format(symbol) import urllib.request from bs4 import BeautifulSoup user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7' headers = {'User-Agent': user_agent, } request = urllib.request.Request(NASDAQ, None, headers)
When I return the HttpResponse , there is no error.
I am trying to make context_dict higher in a data template. This gives me a 'Request' object has no attribute Meta . How to fix it?
source share