Re: django + serving static CSS

2010-07-26 Thread Thomas
Thanks Alex that got it working! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For mo

Re: django + serving static CSS

2010-07-23 Thread Alex Robbins
Thomas, MEDIA_URL isn't always defined in templates. Make sure that you have the MEDIA context preprocessor installed: http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-media Also, when you actually render the template, are you using RequestContext? If you are

Re: django + serving static CSS

2010-07-23 Thread Miguel Rodriguez
Hi Thomas, as you can see in django docs (http:// docs.djangoproject.com/en/dev/ref/settings/#setting-MEDIA_URL) MEDIA_URL --> it's just the url where your media (static content) resides. it can be a complete url (http://) or a reference to your current domain (/media/) So in the templates

Re: django + serving static CSS

2010-07-23 Thread Thomas
Michale many thanks for your help. I added your suggestions. But that did not change the django GET request... It still tries to load the file http://127.0.0.1:8000/css/base.css instead of http://127.0.0.1:80/media/css/base.css Maybe it helps mentioning that this is with the Development server

Re: django + serving static CSS

2010-07-23 Thread Casey S. Greene
Sorry, I just noticed the 80/8000 ports. A better answer anyway would be to use the media URL: http://docs.djangoproject.com/en/dev/ref/settings/#setting-MEDIA_URL -- Casey On 07/23/2010 08:24 AM, Casey S. Greene wrote: Maybe I am confused but I think the answer is to put into the base tem

Re: django + serving static CSS

2010-07-23 Thread Casey S. Greene
Maybe I am confused but I think the answer is to put into the base template? I believe he said that /media is serving the files. -- Casey On 07/23/2010 07:35 AM, Michael P. Soulier wrote: On 23/07/10 Thomas said: Hi I am trying to include a css file and I've tried this in settings.py: ME

Re: django + serving static CSS

2010-07-23 Thread Michael P. Soulier
On 23/07/10 Thomas said: > Hi I am trying to include a css file and I've tried this in > settings.py: > > MEDIA_URL = "http://localhost:80"; > MEDIA_ROOT = '/media/' > > I have an apache running there and navigating to http://localhost/media > works fine. > In my base template I have this: > >