Maybe you can use something lie this:

MEDIA_ROOT = os.path.join(os.path.dirname(__file__),
'the_name_of_your_folder').replace('\\','/')

that makes it independent of the particular path on your computer or
the production server.....works withouth changing anything :)

On Feb 20, 10:11 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > The development server doesn't do any 'magic' to serve static files
> > for you, you'll need to setup your URL conf with a path for serving
> > static media from. Also note the "big fat disclaimer" in the
> > documentation!
>
> I like to use the following in my urls.py file:
>
>    if 'runserver' in argv:
>        urlpatterns += patterns('',
>            (r'^media/(?P<path>.*)$',
>                'django.views.static.serve',
>                {'document_root': settings.MEDIA_ROOT}
>                ),
>            )
>
> This allows me to serve media from the development server, but it
> doesn't alter my urlpatterns in production where the actual
> web-server handles serving media.
>
> -tim
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to