tags:

views:

31

answers:

1

hello, i want to include a css file into the header of my documents, but i have a few questions: 1.Where should i set the path to media, and it should be a relative/absolute path? In settings.py, i 've tried setting MEDIA_URL but my style is still 'unseen' 2.how can i make the htmls to inheric that syle (for not adding the href in every page)?

i've tryed writing like:

<link href="/media/default.css" rel="stylesheet" type="text/css" />

having set

MEDIA_URL = '/media/'

but it doesn't work. media is a folder inside my project

shold i set the Media _root to? how should this be done? thanks

+1  A: 

you also need to handle the url that serves the file, http://docs.djangoproject.com/en/dev/howto/static-files/

Ashok