It looks you have unnecessary 'static' part in your template. MEDIA_ROOT
already contains 'static', so template should looks like this:

<link rel="stylesheet" type="text/css" media="screen" href="{{ MEDIA_ROOT
}}css/style.css" />

On Tue, May 3, 2011 at 12:21 PM, Pascal Moutia <moutia.pas...@gmail.com>wrote:

> Hi there Django-users
>
> I'm suppose to link CSS to my base.html but i can't get it worked :s there
> is my url line:
>
>
> if settings.DEBUG:
>    urlpatterns += patterns('',
>        url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root': settings.PROJECT_PATH+'/static/', 'show_indexes': True}),
> )
>
>
> and my html link with the MEDIA_URL setting:
>
> link rel="stylesheet" type="text/css" media="screen" href="{{ MEDIA_ROOT
> }}static/css/style.css" />
>
> import os.path
> PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
>
> MEDIA_ROOT = os.path.join(PROJECT_PATH, '/static/')
>
>

-- 
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.

Reply via email to