settings.py
changeset 5 962b45987a02
parent 4 ac11fee16880
child 6 eb8e00312877
equal deleted inserted replaced
4:ac11fee16880 5:962b45987a02
    34 
    34 
    35 # If you set this to False, Django will make some optimizations so as not
    35 # If you set this to False, Django will make some optimizations so as not
    36 # to load the internationalization machinery.
    36 # to load the internationalization machinery.
    37 USE_I18N = True
    37 USE_I18N = True
    38 
    38 
       
    39 ROOT_PATH = os.path.dirname(__file__)
       
    40 
    39 # Absolute path to the directory that holds media.
    41 # Absolute path to the directory that holds media.
    40 # Example: "/home/media/media.lawrence.com/"
    42 # Example: "/home/media/media.lawrence.com/"
    41 MEDIA_ROOT = ''
    43 MEDIA_ROOT = os.path.join(ROOT_PATH, 'site-content')
    42 
    44 
    43 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
    45 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
    44 # trailing slash if there is a path component (optional in other cases).
    46 # trailing slash if there is a path component (optional in other cases).
    45 # Examples: "http://media.lawrence.com", "http://example.com/media/"
    47 # Examples: "http://media.lawrence.com", "http://example.com/media/"
    46 MEDIA_URL = ''
    48 MEDIA_URL = '/site-content/'
    47 
    49 
    48 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
    50 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
    49 # trailing slash.
    51 # trailing slash.
    50 # Examples: "http://foo.com/media/", "/media/".
    52 # Examples: "http://foo.com/media/", "/media/".
    51 ADMIN_MEDIA_PREFIX = '/media/'
    53 ADMIN_MEDIA_PREFIX = '/media/'
    67 )
    69 )
    68 
    70 
    69 ROOT_URLCONF = 'spoken_tut.urls'
    71 ROOT_URLCONF = 'spoken_tut.urls'
    70 
    72 
    71 TEMPLATE_DIRS = (
    73 TEMPLATE_DIRS = (
    72        '/home/hg/repos/spoken_tut/template',
    74     os.path.join(ROOT_PATH, 'template'),
    73     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    75     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    74     # Always use forward slashes, even on Windows.
    76     # Always use forward slashes, even on Windows.
    75     # Don't forget to use absolute paths, not relative paths.
    77     # Don't forget to use absolute paths, not relative paths.
    76 )
    78 )
    77 
    79