Maybe an example would be useful as well:

====== Apache conf file =======

<VirtualHost *>
    ServerName site.com
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot /home/user/django/site

    <Location "/">
        SetHandler python-program
        PythonPath "['/home/user/django'] + sys.path"
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE recruiting_new.settings
        #PythonDebug On
    </Location>
    <Location "/site_media/">
        SetHandler None
    </Location>
    <Location "/admin_media/">
        SetHandler None
    </Location>

Site_media is a sub-directory in my site directory.
Admin_media is a short-cut to the django_src/django/contrib/admin/media
directory. The short-cut is also in the site directory.


====== settings.py file =======

MEDIA_ROOT = '/home/user/django/site/site_media/'
ADMIN_MEDIA_PREFIX = '/admin_media/'

Templates:

TEMPLATE_DIRS = (
    '/home/user/django/site/templates',
)


This works for me.

Vincent



On 7/6/07 12:09 AM, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:

> 
> On 7/5/07, John-Scott <[EMAIL PROTECTED]> wrote:
>> In my settings.py, I now have:
>> MEDIA_ROOT = '/var/www/mysite.com/media/'
>> MEDIA_URL = 'http://mysite.com/media/'
>> ADMIN_MEDIA_PREFIX = '/media/'
> 
> Err, I don't have my code or settings file handy.   This is the kind
> of thing you forget, since it just works once you have it configured.
> 
> But if you plan to serve media other than admin, you'll want to nest
> the admin media dir inside your regular media url.
> 
> So maybe you want MEDIA_URL = http://mysite.com/media/ and
> ADMIN_MEDIA_PREFIX = 'http://mysite.com/media/admin/'
> 
>> Anyway, want to say thanks again to everyone for chiming in, this is
>> one of the friendliest and most helpful user groups I've had the
>> pleasure of participating in.
> 
> That makes me feel kinda fuzzy.  :)
>   -Jeremy
> 
> > 

-- 
Vincent R. Nijs
Assistant Professor of Marketing
Kellogg School of Management, Northwestern University
2001 Sheridan Road, Evanston, IL 60208-2001
Phone: +1-847-491-4574 Fax: +1-847-491-2498
E-mail: [EMAIL PROTECTED]
Skype: vincentnijs




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