You should def. read those articles. A quick fix (if you're in a time
crunch) is to add this to your base urls.py inserting the proper values:


if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^my_sites_media_folder/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': '/path/to/my/media/folder'}),
    )

which would allow you to go to
http://localhost:8000/my_sites_media_folder/ and serve static files
out of /path/to/my/media/folder.

again.. you should still read the articles to figure out WHY this works.

-justin

On Fri, Feb 22, 2008 at 3:19 PM, Pete Crosier <[EMAIL PROTECTED]>
wrote:

>
> Have a look at the links below, I think you're over-estimating what
> MEDIA_URL does for you -
> http://www.djangoproject.com/documentation/static_files/
> http://www.djangoproject.com/documentation/settings/#media-url
>
> On Feb 22, 7:54 pm, troeten <[EMAIL PROTECTED]> wrote:
> > Hi,
> > i have a problem with the MEDIA_URL in django.
> > My settings.py section looks like this:
> >
> > # Absolute path to the directory that holds media.
> > # Example: "/home/media/media.lawrence.com/"
> > MEDIA_ROOT = '/Users/stefan/Development/ju_amerang/media/'
> >
> > # URL that handles the media served from MEDIA_ROOT.
> > # Example: "http://media.lawrence.com";
> > MEDIA_URL = 'http://127.0.0.1:8000/media/'
> >
> > but, when i want to go tohttp://127.0.0.1:8000/media/with my browser
> > i get every time a 404 Error with the following message:
> > Using the URLconf defined in ju_amerang.urls, Django tried these URL
> > patterns, in this order:
> > ^mitglieder/
> > ^admin/
> > The current URL, /media/, didn't match any of these.
> >
> > can anyone help me?
> >
> > sorry for my bad englisch, but i hope you understand my
> >
> > regards stefan
> >
>


-- 
Justin Lilly
Web Developer

--~--~---------~--~----~------------~-------~--~----~
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