Commit 035e6965 authored by Michal Čihař's avatar Michal Čihař

Easier way for adjusting prefix

parent 823ccc1d
......@@ -145,8 +145,7 @@ using mod_wsgi (also available as :file:`examples/apache-path.conf`):
Additionally you will have to adjust :file:`weblate/settings.py`::
MEDIA_URL = '/weblate/media/'
STATIC_URL = '/weblate/static/'
URL_PREFIX = '/weblate'
.. note:: This is supported since Weblate 1.3.
......
......@@ -94,6 +94,9 @@ USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = False
# URL prefix to use
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
......@@ -101,7 +104,7 @@ MEDIA_ROOT = '%s/media/' % WEB_ROOT
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = '/media/'
MEDIA_URL = '%s/media/' % URL_PREFIX
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
......@@ -111,12 +114,12 @@ STATIC_ROOT = ''
# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'
STATIC_URL = '%s/static/' % URL_PREFIX
# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
# Examples: "http://foo.com/static/admin/", "/static/admin/".
ADMIN_MEDIA_PREFIX = '/static/admin/'
ADMIN_MEDIA_PREFIX = '%s/static/admin/' % URL_PREFIX
# Additional locations of static files
STATICFILES_DIRS = (
......@@ -272,8 +275,14 @@ GIT_ROOT = '%s/repos/' % WEB_ROOT
# Title of site to use
SITE_TITLE = 'Weblate'
# URL of login
LOGIN_URL = '%s/accounts/login/' % URL_PREFIX
# URL of logout
LOGOUT_URL = '%s/accounts/logout/' % URL_PREFIX
# Default location for login
LOGIN_REDIRECT_URL = '/'
LOGIN_REDIRECT_URL = '%s/' % URL_PREFIX
# How long activation mail is valid
ACCOUNT_ACTIVATION_DAYS = 7
......
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