I'm using WSGI and tried your suggestion, but something is still missing.
The generated HTML refers for example to a stylesheet
href="/media/css/base.css". But this is in the django install directory,
which is not being served. So I feel there has to be an Alias pointing
there. Even if I did that, I'm confused about how I can overlay the modified
base_site.html that the tutorial had us construct. My full VirtualHost
configuration is:

<VirtualHost *:80>
        ServerAdmin user@foo

        Alias /media "/usr/local/www/static/media/"
        <Directory "/usr/local/www/static/media">
                Order allow,deny
                Allow from all
        </Directory>

        WSGIScriptAlias / /usr/local/www/scripts/sequme.wsgi

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,

        # alert, emerg.

        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Thanks for all the help!


On Thu, Feb 17, 2011 at 12:44 PM, Marcos Moyano <marcosmoy...@gmail.com>wrote:

> 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 <agarwal1...@gmail.com>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 <gufym...@gmail.com>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 django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> 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 django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> 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 django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> 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 django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to