Thanks Rajesh! it works!

On Dec 23, 10:47 am, Rajesh Dhawan <rajesh.dha...@gmail.com> wrote:
> On Dec 23, 10:38 am, "tom.s.macken...@gmail.com"
>
>
>
> <tom.s.macken...@gmail.com> wrote:
> > Hello,
>
> > I am having some trouble serving static files with the development
> > server. I have read the docs and various blogs out there and nothing
> > seems to work. I am going nuts over this :) I have tried tweaking the
> > values in my settings.py but I reverted them back to their defaults.
> > Below is the info for my project.
>
> > myProject/
> >     templates/
> >         appX/
> >         admin/
> >     media/
> >         appX/
> >             css/
> >             img/
> >       admin/
> >             css/
> >             img/
>
> > settings.py
> > BASE_PATH=os.path.dirname(__FILE__)
> > MEDIA_ROOT=BASE_PATH+/media
> > MEDIA_URL=/media/
> > ADMIN_MEDIA_PREFIX
>
> > In, myProject/templates/base.html I link the css as, "/media/appX/css/
> > default.css"
>
> > urls.py
>
> > (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
> >         {'document_root': '/webapps/myProj/media' }),
>
> Your MEDIA_URL is /media/ but urls.py is hooked into /site_media/.
> Change your URL config to the following:
>
> (r'^media/(?P<path>.*)$', 'django.views.static.serve',
>         {'document_root': '/webapps/myProj/media' }),
>
> -Rajesh D
--~--~---------~--~----~------------~-------~--~----~
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