Source

django-wsgiserver / tests / testdjangoproject / views.py

Full commit
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext
from django.shortcuts import render_to_response
import pprint

def hello(request):
    data = {}
    
    data['HAS_STATICFILES_ROOT'] = True
    try:
        if settings.STATICFILES_ROOT:
            data['HAS_STATICFILES_ROOT'] = True
            print "see the STATICFILES_ROOT:", settings.STATICFILES_ROOT
    except:
        data['HAS_STATICFILES_ROOT'] = False
        pass

    c = RequestContext(request, data)
    return render_to_response("hello.html", context_instance=c)