This may not be relevant, but I've had no end of confusion
with
ADMIN_MEDIA_PREFIX. What I've found is this;
If you're running the development server, the value of
ADMIN_MEDIA_PREFIX is effectively ignored. Look at the code
in django/
core/servers/basehttp.py, in AdminMediaHandler and you'll
see it
serves the media up from the location that django is
installed from.
However, once you use something like fastcgi or mod_python
to serve
your content, the value of ADMIN_MEDIA_PREFIX is used, and
you need to
make sure it's pointing to something (of course,
Apache/lighttpd etc
rewrite rules can be used to tidy things up).
This is all based on the description of what
ADMIN_MEDIA_PREFIX does
by Malcolm Tredinnick:- http://groups.google.com/group/django-users/msg/
df0605a05a747e57
hope this helps,
tone
On Sep 28, 6:35 pm, omat <o... gezgin.com> wrote:
> Hi,
>
> This looks like a bug to me.
>
> When I set ADMIN_MEDIA_PREFIX = '/media/', some weird
things happen,
> such as:
> - I get different 404 messages for non existing files
> - the served files does not appear in the development
server console
> - the files under
site-packagesdjangocontribadminmedia are
> served, instead of the /media/ folder in under my
MEDIA_ROOT
>
> But when I set ADMIN_MEDIA_PREFIX = 'http://localhost:8000/me
dia/'
> everything works as expected, that is:
> - standard 404 messages
> - served files appear in the console
> - files under MEDIA_ROOT/media/ are served
>
> Any idea why this difference exists?
--~--~---------~--~----~------------~-------~--~----~
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-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|