>From what I'm seeing, you haven't created your own context processor, and the default processors do not add MEDIA_URL to the context.
In other words, MEDIA_URL will always be null unless you explicitly pass it to the template. You could do this on every view, or write a context processor that automatically sends it every time. Please refer to the official docs to learn how to define a custom context processor, or read my explanation on SO: http://stackoverflow.com/questions/3722174/django-template-inheritance-and-context/3731459#3731459 Cheers, AT On 7/20/11, Jussiê Vieira Toledo <jus...@odig.net> wrote: > ok, sorry > > I did not see that it was only in English. > > At first everything is configured ok, and processors of the templates here's > the code: > > TEMPLATE_CONTEXT_PROCESSORS = ( > "django.core.context_processors.auth" > "django.core.context_processors.request" > # "grappelli.context_processors.admin_url" > ) > > Thank you. > > > > ---------- > > * > Jussiê Vieira Toledo > * > Web Developer > > * > * > > * > > *Conheça a OdiG.net <http://odig.net/> > Siga a @MundoOdiG <http://twitter.com/MundoOdiG> > Curta a OdiG no > Facebook<http://www.facebook.com/pages/OdiG-Agencia-Digital/169820953056812?v=wall> > Conecte-se no > LinkedIn<http://www.linkedin.com/company/odig-solu-es-digitais-ltda> > Ligue para (55) 3028-2068 > * > * > *Sobre ** > Jussiê Vieira Toledo > * > no Twitter: @jussievt <http://twitter.com/jussievt> > > > 2011/7/19 Andre Terra <andrete...@gmail.com> > >> Are you using a context processor to pass MEDIA_URL to the template? >> >> How are you serving your static files? Have you setup your server >> correctly, or configured django to serve them? >> >> Finally, please post in English so that everyone can understand your >> question, not only for the sake of helping, but also so that others >> might learn from the answers as well. >> >> >> Best regards, >> Andre Terra >> >> On 7/19/11, Jussiê Vieira Toledo <jus...@odig.net> wrote: >> > E ae galera! >> > >> > Estou tentando carregar um css para uma página, mas no caminho não >> > estou acertando. >> > Como vejo qual é a minha pasta root? >> > >> > Por exemplo estou tentando desta duas formas: >> > 1 - <link href="{{ MEDIA_URL }}/website/csscida.css" rel="stylesheet" >> > type="text/css" /> >> > onde MEDIA_URL = '/media/' e >> > MEDIA_ROOT = os.path.join(PROJECT_ROOT_PATH, 'media') >> > >> > e 2 - >> > <link href="/cida/media/website/css/cida.css" rel="stylesheet" >> > type="text/css" /> >> > onde a pasta "cida" seria onde eu dei o startproject >> > >> > Valeu ae galera, >> > >> > -- >> > 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. >> > >> > >> >> -- >> Sent from my mobile device >> >> -- >> 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. >> >> > > -- > 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. > > -- Sent from my mobile device -- 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.