2
我有這個視圖呈現靜態頁面,但我似乎無法趕上頁面的引用HTTP引用問題
def landing(request, referer='google'): ''' Loads the landing page ''' msg = '' if request.method == 'GET': referer = request.META['HTTP_REFERER'] return render_to_response('index.html', {'WSGI_DIR': settings.WSGI_DIR,'csrf_value': get_token(request), 'referer':referer},context_instance=RequestContext(request))它不斷彈出KeyError在/'HTTP_REFERER'。我輸入了所需的一切。有人有線索嗎?