On 7/2/06, Tyson Tate <[EMAIL PROTECTED]> wrote:

>
> Do I need to add a special line to my urls.py file? My settings are
> as such:
>
> MEDIA_ROOT = '/Users/ttate/Desktop/fallingbullets/media/'
> MEDIA_URL = 'http://localhost:8000/media/'
> ADMIN_MEDIA_PREFIX = '/admin_media/'
>

Yeah, you would need a special line. Remember that by default, Django
will not serve up static content (for security and performance
reasons). So your eventual Apache or whatever server should do that.
For testing purposes though, I like to do the following in my urls.py:

if settings.DEBUG:
    urlpatterns += patterns('',
     (r'^site_media/(.*)$', 'django.views.static.serve',
{'document_root':'/var/www/webcompiler/site_media/',
'show_indexes':True}),
     )


This comes right from the Django static media doc:
http://www.djangoproject.com/documentation/static_files/

Jay P.

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

Reply via email to