Better directory definition

This commit is contained in:
Michal Čihař 2012-02-29 14:46:18 +01:00
parent 8f0e58df46
commit 1a53ba6417
2 changed files with 6 additions and 13 deletions

View File

@ -32,7 +32,10 @@
<a class="button" href="{{ unit.translation.get_translate_url }}?type={{ type }}&amp;oldpos={{ unit.position }}&amp;dir=back">{% trans "Previous" %}</a>
<a class="button" href="{{ unit.translation.get_translate_url }}?type={{ type }}&amp;oldpos={{ unit.position }}">{% trans "Next" %}</a>
</td><td>
<input class="button" type="submit" value="{% trans "Save" %}" />
{{ if user.is_authenticated }}
<input class="button" type="submit" value="{% trans "Save" %}" name="save" />
{{ endif }}
<input class="button" type="submit" value="{% trans "Suggest" %}" name="suggest" />
</td></tr>
</table>

View File

@ -1,7 +1,7 @@
# Django settings for weblate project.
# -*- coding: UTF-8 -*-
from socket import gethostname
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@ -23,17 +23,7 @@ DATABASES = {
}
}
HOSTNAME = gethostname()
if HOSTNAME == 'rincewind':
WEB_ROOT = '/home/mcihar/private/weblate/'
elif HOSTNAME == 'raptor':
WEB_ROOT = '/home/nijel/work/weblate/'
elif HOSTNAME == 'nutt':
WEB_ROOT = '/home/nijel/weblate/'
elif HOSTNAME == 'web':
WEB_ROOT = '/var/lib/django/weblate/'
else:
WEB_ROOT = '/home/nijel/work/weblate/'
WEB_ROOT = os.path.dirname(os.path.abspath(__file__))
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name