PROJECT_PATH os path realpath os path join os path realpath os path di

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
PROJECT_PATH = os.path.realpath(os.path.join(os.path.realpath(os.path.dirname(__file__)), '..', '..'))
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
LOCALE_PATHS = (
os.path.join(PROJECT_PATH, 'locale')
)
MEDIA_URL = '/media/'
TEMPLATE_DIRS = (
os.path.join(PROJECT_PATH, 'templates'),
)
STATIC_ROOT = os.path.join(PROJECT_PATH, 'static-root')
STATIC_URL = '/static/'
ADMIN_MEDIA_PREFIX = '/static/admin/'
STATICFILES_DIRS = (
('', os.path.join(PROJECT_PATH, 'static')),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)