Commit 4e6aa813 authored by Michal Čihař's avatar Michal Čihař

Use os.path.join instead of using format string

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 1ace8ff4
......@@ -58,7 +58,7 @@ MT_GOOGLE_KEY = get('MT_GOOGLE_KEY', None)
MT_TMSERVER = get('MT_TMSERVER', None)
# Path where git repositories are stored, it needs to be writable
GIT_ROOT = get('GIT_ROOT', '%s/repos/' % WEB_ROOT)
GIT_ROOT = get('GIT_ROOT', os.path.join(WEB_ROOT, 'repos'))
# Title of site to use
SITE_TITLE = get('SITE_TITLE', 'Weblate')
......
......@@ -129,7 +129,7 @@ URL_PREFIX = ''
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = '%s/media/' % WEB_ROOT
MEDIA_ROOT = os.path.join(WEB_ROOT, 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
......@@ -228,7 +228,7 @@ TEMPLATE_DIRS = (
# or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'%s/html/' % WEB_ROOT,
os.path.join(WEB_ROOT, 'html'),
)
INSTALLED_APPS = (
......@@ -250,7 +250,7 @@ INSTALLED_APPS = (
'weblate',
)
LOCALE_PATHS = ('%s/../locale' % WEB_ROOT, )
LOCALE_PATHS = (os.path.join(WEB_ROOT, '..', 'locale'), )
TEMPLATE_CONTEXT_PROCESSORS = (
......@@ -378,7 +378,7 @@ MT_GOOGLE_KEY = None
MT_TMSERVER = None
# Path where git repositories are stored, it needs to be writable
GIT_ROOT = '%s/repos/' % WEB_ROOT
GIT_ROOT = os.path.join(WEB_ROOT, 'repos')
# Title of site to use
SITE_TITLE = 'Weblate'
......
......@@ -43,7 +43,7 @@ if 'TRAVIS_DATABASE' in os.environ:
ADMINS = (('Weblate test', 'noreply@weblate.org'), )
# Different root for test repos
GIT_ROOT = '%s/test-repos/' % WEB_ROOT
GIT_ROOT = os.path.join(WEB_ROOT, 'test-repos')
# Avoid migrating during testsuite
SOUTH_TESTS_MIGRATE = False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment