Ignore:
Timestamp:
Jan 8, 2010, 4:49:02 AM (16 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
b0f541c
Parents:
70ce03a
git-author:
Alex Dehnert <adehnert@…> (01/08/10 04:49:02)
git-committer:
Alex Dehnert <adehnert@…> (01/08/10 04:49:02)
Message:

Serve static media

File:
1 edited

Legend:

Unmodified
Added
Removed
  • treasury/settings.py

    rf468e6d rcafab4c  
    22import os
    33
    4 APP_ROOT = os.path.dirname(__file__)
     4SITE_ROOT = os.path.normpath(os.path.dirname(__file__))
    55DEFAULT_DOMAIN = 'mit.edu'
    66
     
    4040# Absolute path to the directory that holds media.
    4141# Example: "/home/media/media.lawrence.com/"
    42 MEDIA_ROOT = ''
     42MEDIA_ROOT = SITE_ROOT + '/media/'
     43print "MEDIA_ROOT='%s'" % (MEDIA_ROOT, )
    4344
    4445# URL that handles the media served from MEDIA_ROOT. Make sure to use a
    4546# trailing slash if there is a path component (optional in other cases).
    4647# Examples: "http://media.lawrence.com", "http://example.com/media/"
    47 MEDIA_URL = ''
     48MEDIA_URL = '/media/'
    4849
    4950# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
    5051# trailing slash.
    5152# Examples: "http://foo.com/media/", "/media/".
    52 ADMIN_MEDIA_PREFIX = '/media/'
     53ADMIN_MEDIA_PREFIX = '/media/admin/'
    5354
    5455# Make this unique, and don't share it with anybody.
     
    7677    # Always use forward slashes, even on Windows.
    7778    # Don't forget to use absolute paths, not relative paths.
    78     APP_ROOT + '/templates/',
     79    SITE_ROOT + '/templates/',
    7980)
    8081
Note: See TracChangeset for help on using the changeset viewer.