On Wed, May 18, 2011 at 4:42 PM, John Wheeler <j...@highvolumeseller.com> wrote: > Dude, > STATICFILES_DIRS = ('/home/jwheeler/projects/pwscheduler/static',) > STATIC_URL = '/static/' > TEMPLATE_LOADERS = ( > 'django.template.loaders.filesystem.Loader', > 'django.template.loaders.app_directories.Loader', > 'django.template.loaders.eggs.Loader', > ) > INSTALLED_APPS = ( > 'django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.messages', > 'django.contrib.admin', > 'django.contrib.staticfiles', > 'account', > 'permit', > 'appointment' > # Uncomment the next line to enable admin documentation: > # 'django.contrib.admindocs', > ) > in my settings > > I have > if settings.DEBUG: > urlpatterns += staticfiles_urlpatterns() > in my urls.py > I am linking to stylesheets like this: <link rel="stylesheet" > type="text/css" href="{{ STATIC_URL }}styles.css"/> > What step am I leaving out? According to the docs, I am done for > development, but it's not working. the STATIC url is empty. The whole time > I'm punching myself in the next wondering who thought it would ever be OK to > make developers go through this to serve a damn PNG or whatever during > development? Are you kidding? this stuff has to got work out of the box with > zero fuss. Maybe I haven't seen the new docs? >
Attitude not withstanding, how are you rendering your templates? If you aren't using a RequestContext, then settings.TEMPLATE_CONTEXT_PROCESSORS will not be run to populate the context, and so STATIC_URL will be empty. BTW, staticfiles is an entirely optional component of Django, it isn't required. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.