aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2014-01-11 11:22:48 +0100
committerWojciech Polak <polak@gnu.org>2014-01-11 11:22:48 +0100
commit2631110148cd41b0b1b34b83f036a09cf63374f8 (patch)
treea38ab81387abccf83068c18b85324c2f04620db1
parenta4bd115da9f0e35369973c88c0e4849ce6614751 (diff)
downloaddico-2631110148cd41b0b1b34b83f036a09cf63374f8.tar.gz
dico-2631110148cd41b0b1b34b83f036a09cf63374f8.tar.bz2
Minor Dicoweb changes.
-rw-r--r--.gitignore3
-rw-r--r--dicoweb/manage.py15
-rw-r--r--dicoweb/requirements.txt2
-rw-r--r--dicoweb/settings-sample.py14
4 files changed, 28 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index eb41859..4d52b8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,6 @@ libtool
local-tests
m4
stamp-h1
+dicoweb/bin
+dicoweb/lib
+dicoweb/include
diff --git a/dicoweb/manage.py b/dicoweb/manage.py
index a219c13..7b1b8bf 100644
--- a/dicoweb/manage.py
+++ b/dicoweb/manage.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# This file is part of GNU Dico.
-# Copyright (C) 2008-2009, 2012, 2013 Wojciech Polak
+# Copyright (C) 2008-2009, 2012-2014 Wojciech Polak
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,8 +16,15 @@
# You should have received a copy of the GNU General Public License
# along with GNU Dico. If not, see <http://www.gnu.org/licenses/>.
-from django.core.management import execute_manager
-import settings
+import os
+import sys
if __name__ == '__main__':
- execute_manager(settings)
+ SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
+ sys.path.insert(0, os.path.join(SITE_ROOT, '../'))
+
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dicoweb.settings')
+
+ from django.core.management import execute_from_command_line
+
+ execute_from_command_line(sys.argv)
diff --git a/dicoweb/requirements.txt b/dicoweb/requirements.txt
index b5c8a15..47b7897 100644
--- a/dicoweb/requirements.txt
+++ b/dicoweb/requirements.txt
@@ -1,2 +1,2 @@
Django >=1.4.5
-git+git://git.gnu.org.ua/wit.git
+git+git://git.gnu.org.ua/wit.git#egg=wit
diff --git a/dicoweb/settings-sample.py b/dicoweb/settings-sample.py
index 7e1f163..d7cb008 100644
--- a/dicoweb/settings-sample.py
+++ b/dicoweb/settings-sample.py
@@ -1,7 +1,7 @@
# Django settings for Dicoweb project.
#
# This file is part of GNU Dico.
-# Copyright (C) 2008-2010, 2012, 2013 Wojciech Polak
+# Copyright (C) 2008-2010, 2012-2014 Wojciech Polak
#
# GNU Dico is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,6 +22,11 @@ SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
DEBUG = True
TEMPLATE_DEBUG = True
+ALLOWED_HOSTS = [
+ 'localhost',
+ '127.0.0.1',
+]
+
ADMINS = (
('Your Name', 'Your e-mail address'),
)
@@ -30,6 +35,11 @@ MANAGERS = ADMINS
SITE_ID = 1
USE_I18N = True
+# Directories where Django looks for translation files.
+LOCALE_PATHS = (
+ os.path.join(SITE_ROOT, 'locale'),
+)
+
TIME_ZONE = 'UTC'
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_NAME = 'dicoweb_lang'
@@ -74,6 +84,8 @@ MIDDLEWARE_CLASSES = (
ROOT_URLCONF = 'dicoweb.urls'
+WSGI_APPLICATION = 'dicoweb.wsgi.application'
+
TEMPLATE_DIRS = (
os.path.join(SITE_ROOT, 'templates'),
)

Return to:

Send suggestions and report system problems to the System administrator.