On Sat, Oct 4, 2008 at 3:19 PM, mrsource <[EMAIL PROTECTED]> wrote:

>
> I can upload images on the right place in the file system, but then
> django don't serve them.
> I'm using the development server and the current SVN version of
> django.
>
> I have this configuration in settings.py:
> MEDIA_ROOT = 'D:/codice/workspace/aurea/media/'
> MEDIA_URL = '/media/'
> ADMIN_MEDIA_PREFIX = '/media/'
>

Do not use the same value for MEDIA_URL and ADMIN_MEDIA_PREFIX, as noted
here:

http://docs.djangoproject.com/en/dev/ref/settings/#admin-media-prefix

When you do this the admin media server built into the development server
handles everything under /media/, and the static server you have configured
in urls.py never sees the requests.

Karen


>
>
> and in url.py:
>
> from django.conf import settings
> if settings.DEBUG
>    urlpatterns += patterns('django.views.static',
>    (r'^media/(?P<path>.*)$',
>        'serve', {
>        'document_root':settings.MEDIA_ROOT,
>        'show_indexes': True }),)
>
>
> >
>

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