Trouble accessing .css file with Django

joseandres

New Member
I'm just starting out with Django, using PyDev in AptanaStudio3. I used the helpful Django tutorials to build the backbone of my simple project. Now I am trying to use css for some basic formatting and coloring, but have spent quite a while struggling.The html page is still showing up fine. It just isn't grabbing the css (404). I know this from the console:\[code\][20/Mar/2013 12:41:51] "GET /signup/ HTTP/1.1" 200 306[20/Mar/2013 12:41:51] "GET /signup/static/signup.css HTTP/1.1" 404 2750\[/code\]My file structure:\[code\]Learning- Learning--- templates----- 404.html----- 500.html--- _init.py--- settings.py--- urls.py--- wsgi.py- signup--- static----- signup.css--- templates----- signup------- detail.html------- index.html------- results.html----- __init__.py----- admin.py----- models.py----- tests.py----- urls.py----- view.py--- manage.py--- sqlite.db--- python\[/code\]In settings:\[code\]STATIC_ROOT = ''STATIC_URL = 'static/'STATICFILES_DIRS = ('')STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder',)\[/code\]In my html template:\[code\]<html> <head> <title>User List</title> <link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/15518654/{{ STATIC_URL }}signup.css" />...\[/code\]In views.py:\[code\]def ip_address_processor(request): return {'ip_address': request.META['REMOTE_ADDR']}def index(request): user_list = User.objects.order_by('name')[:5] template = loader.get_template('signup/index.html') context = RequestContext( request, {'user_list': user_list,}, [ip_address_processor]) return HttpResponse(template.render(context))\[/code\]Any insights?
 
Back
Top