This is the relevant VirtualHost configuration for admin media
WSGI
Alias /media "/usr/local/www/static/media/"
<Directory "/usr/local/www/static/media">
Order allow,deny
Allow from all
</Directory>
MOD_PYTHON
<Location "/media">
SetHandler None
</Localtion>
If this doesn't work perhaps you shoud could paste your VirtualHost
configuration.
Rgds,
Marcos
On Thu, Feb 17, 2011 at 2:23 PM, Ashish Agarwal <[email protected]>wrote:
> I'm still having trouble. My directory structure is:
>
> /usr/local/www/static
> |
> +- contrib/admin/media -- symlink to django/contrib/admin/media
> |
> +- media/admin/base_site.html -- modified version of base_site.html
>
> I've tried every combination of the following, but nothing is working:
>
> DocumentRoot /usr/local/www/static
> - does this need to be set at all?
>
> Alias /media/ /usr/loca/www/static/...
> - not quite sure which directory this should point to
> - I've tried all sensible options, but none work
>
> ADMIN_MEDIA_PREFIX = '/media/'
> - Does this simply have to be equal to whatever URL is used in the Alias
> directive above?
>
> Thank you.
>
>
> On Thu, Feb 17, 2011 at 10:30 AM, Mike Ramirez <[email protected]> wrote:
>
>> On Thursday, February 17, 2011 07:14:16 am ashish wrote:
>>
>> > Hi all. I followed the tutorial to setup a basic django site and run
>>
>> > it with the development server. Everything looks fine. Then, I
>>
>> > configured to use apache. Everything seems to work except the styling.
>>
>> > The login and admin pages have no formatting. On IRC I was told the
>>
>> > issue is that the development server automatically serves the
>>
>> > necessary media, but that you have to explicitly configure apache to
>>
>> > serve static media.
>>
>> >
>>
>> > Okay, but which media needs to be served for the styling to work? I
>>
>> > have not found the answer in the docs. Thank you for any help.
>>
>> normally the path assigned to MEDIA_ROOT and ADMIN_MEDIA ... see below
>> for the configuration settings (pick your production environment)
>>
>> http://docs.djangoproject.com/en/1.2/howto/deployment
>>
>> Mike
>>
>> --
>>
>> If God had not given us sticky tape, it would have been necessary to
>> invent it.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to [email protected].
>> 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.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to [email protected].
> 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.
>
--
Some people, when confronted with a problem, think “I know, I'll use regular
expressions.” Now they have two problems.
Jamie Zawinski, in comp.emacs.xemacs
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.