i want to use css in Django templates..If i give CSS with in the templates it gets working. But i want to use in static serve manner.
settings.py
DEBUG =True
MEDIA_ROOT = 'C:/WorkBase/Python/first/static/'
MEDIA_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/media/'
TEMPLATE_DIRS = (
'C:/WorkBase/Python/first/templates',
)
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
'django.template.loaders.eggs.load_template_source',
)
urls.py
from django.conf import settings
if settings.DEBUG:
urlpatterns +=patterns(' ',
(r'^static/(?p<path>.*)$','django.views.static.serve',{'document_root':settings.MEDIA_ROOT}),
)
I got 'unexpected end of pattern' error for above line
<link rel="stylesheet" type="text/css" href="/static/css/style.css"/>