I was using Django and the static files cannot load, the error is:
ImproperlyConfigured: The storage backend of the staticfiles finder <class 'django.contrib.staticfiles.finders.DefaultStorageFinder'> doesn't have a valid location.
Here is the views.py:
def results(request):
metaUrl = ""
if not request.method == 'POST':
print "Not Post!"
else:
metaUrl = request.POST['urls']
cmodel = InfoController()
(firstList, wordList, sizeList) = cmodel.controller(metaUrl)
print "I am at result"
return render( request, 'infoRetriever/results.html', { 'firstList': firstList, 'wordList': wordList, 'sizeList': sizeList})
It's weird that when I was using
return render_to_response('infoRetriever/results.html', { 'firstList': firstList, 'wordList': wordList, 'sizeList': sizeList}, context_instance=RequestContext(request))
to replace the last sentence in the views.py, the static files loads OK, but other problems would occur. Could anyone help me? Thank you very much.