Definitions for dirs
This commit is contained in:
parent
fa70985bd9
commit
cf675ce5d8
17
settings.py
17
settings.py
@ -20,6 +20,18 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
HOSTNAME = gethostname()
|
||||
if HOSTNAME == 'rincewind':
|
||||
WEB_ROOT = '/home/mcihar/private/weblate/'
|
||||
elif HOSTNAME == 'raptor':
|
||||
WEB_ROOT = '/home/nijel/work/gammu/weblate/'
|
||||
elif HOSTNAME == 'nutt':
|
||||
WEB_ROOT = '/home/nijel/gammu/weblate/'
|
||||
elif HOSTNAME == 'web':
|
||||
WEB_ROOT = '/var/lib/django/weblate/'
|
||||
else:
|
||||
WEB_ROOT = '/home/nijel/work/gammu/weblate/'
|
||||
|
||||
# Local time zone for this installation. Choices can be found here:
|
||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||
# although not all choices may be available on all operating systems.
|
||||
@ -45,12 +57,12 @@ USE_L10N = True
|
||||
|
||||
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||
# Example: "/home/media/media.lawrence.com/media/"
|
||||
MEDIA_ROOT = ''
|
||||
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_URL = '/media/'
|
||||
|
||||
# Absolute path to the directory static files should be collected to.
|
||||
# Don't put anything in this directory yourself; store your static files
|
||||
@ -106,6 +118,7 @@ TEMPLATE_DIRS = (
|
||||
# Put strings here, like "/home/html/django_templates" 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,
|
||||
)
|
||||
|
||||
INSTALLED_APPS = (
|
||||
|
@ -17,7 +17,6 @@ def show_subproject(request, project, subproject):
|
||||
'object': obj,
|
||||
})
|
||||
|
||||
|
||||
def show_translation(request, project, subproject, lang):
|
||||
obj = get_object_or_404(Language, language__code = lang, subproject__slug = subproject, subproject__project__slug = project)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user