I am very new to django, and gone through tutorial for many days , i have started building a small website using django and trying to serve a css f
Your problem is related to this line:
return render_to_response("home_page.html")
Django's template engine requires two things to properly render a template.
The context variable is a key/value dictionary listing all of the variables available to the template.
The render_to_response shortcut actually accepts two different context variable parameters.
You're missing both.
Without these variables, the template doesn't have ANY variables available to it. So your {{ STATIC_URL }} template variable is probably blank.
To correct, try this:
from django.shortcuts import render_to_response
from django.template import RequestContext
def home_page(request):
return render_to_response("home_page.html", {}, context_instance=RequestContext(request))