source: main/branches/3D/openPLM/settings_tests.py @ 662

Revision 662, 5.3 KB checked in by pcosquer, 9 years ago (diff)

3D branch: merge changes from trunk (rev [661])

Line 
1#-!- coding:utf-8 -!-
2# Django settings for openPLM project.
3# sqlite version
4
5import sys
6import os.path
7
8DEBUG = True
9TEMPLATE_DEBUG = DEBUG
10
11ADMINS = (
12    ('Your Name', 'your_email@domain.com'),
13)
14
15MANAGERS = ADMINS
16
17DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
18DATABASE_NAME = 'database_tests.db'             # Or path to database file if using sqlite3.
19DATABASE_USER = ''             # Not used with sqlite3.
20DATABASE_PASSWORD = ''         # Not used with sqlite3.
21DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
22DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
23
24# Local time zone for this installation. Choices can be found here:
25# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
26# although not all choices may be available on all operating systems.
27# If running in a Windows environment this must be set to the same as your
28# system time zone.
29TIME_ZONE = 'Europe/Paris'
30
31# Language code for this installation. All choices can be found here:
32# http://www.i18nguy.com/unicode/language-identifiers.html
33LANGUAGE_CODE = 'en-en'
34
35SITE_ID = 1
36
37# If you set this to False, Django will make some optimizations so as not
38# to load the internationalization machinery.
39USE_I18N = True
40
41# Absolute path to the directory that holds media.
42# Example: "/home/media/media.lawrence.com/"
43MEDIA_ROOT = 'media/'
44
45# URL that handles the media served from MEDIA_ROOT. Make sure to use a
46# trailing slash if there is a path component (optional in other cases).
47# Examples: "http://media.lawrence.com", "http://example.com/media/"
48MEDIA_URL = '/media/'
49
50# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
51# trailing slash.
52# Examples: "http://foo.com/media/", "/media/".
53ADMIN_MEDIA_PREFIX = '/../media/admin/'
54
55# Make this unique, and don't share it with anybody.
56SECRET_KEY = '0ham7d#fh669-xi@wxf1wcpbhn6tbbegtv_cml()_wcboyw&u&'
57
58# List of callables that know how to import templates from various sources.
59TEMPLATE_LOADERS = (
60    ('django.template.loaders.cached.Loader', (
61    'django.template.loaders.filesystem.load_template_source',
62    'django.template.loaders.app_directories.load_template_source',
63    )),
64#     'django.template.loaders.eggs.load_template_source',
65)
66
67MIDDLEWARE_CLASSES = (
68    'django.middleware.common.CommonMiddleware',
69    'django.contrib.csrf.middleware.CsrfMiddleware',
70    'django.contrib.sessions.middleware.SessionMiddleware',
71    'django.middleware.locale.LocaleMiddleware',
72    'django.contrib.auth.middleware.AuthenticationMiddleware',
73)
74
75ugettext = lambda s: s
76LANGUAGES = (
77      ('fr', u'Français'),
78      ('en', 'English'),
79)
80
81ROOT_URLCONF = 'openPLM.urls'
82
83TEMPLATE_DIRS = (
84    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
85    # Always use forward slashes, even on Windows.
86    # Don't forget to use absolute paths, not relative paths.
87    "templates",
88    "document3D/templates",
89)
90
91INSTALLED_APPS = (
92    'django.contrib.auth',
93    'django.contrib.contenttypes',
94    'django.contrib.sessions',
95    'django.contrib.sites',
96    'django.contrib.admin',
97    'django.contrib.comments',
98    'django.contrib.humanize',
99    'djcelery',
100    'haystack',
101    'openPLM.plmapp',
102    # you can add your application after this line
103    'openPLM.cad',
104    'openPLM.computer',
105    'openPLM.cae',
106    'openPLM.office',
107    'openPLM.document3D',
108)
109
110AUTH_PROFILE_MODULE = 'plmapp.UserProfile'
111
112CELERY_CREATE_MISSING_QUEUES = True
113CELERY_ROUTES = {
114    "openPLM.plmapp.tasks.update_index": {"queue": "index"},
115    "openPLM.plmapp.mail.do_send_histories_mail" : {"queue" : "mails"},
116    "openPLM.plmapp.mail.do_send_mail" : {"queue" : "mails"},
117}
118
119EMAIL_HOST = 'localhost'
120EMAIL_PORT = 1025
121
122######################
123# openPLM's settings #
124######################
125
126#: directory that stores documents. Make sure to use a trailing slash.
127DOCUMENTS_DIR = "/tmp/docs/"    #aquica
128THUMBNAILS_DIR = os.path.join(MEDIA_ROOT, "thumbnails/")
129#: directory that stores thumbnails. Make sure to use a trailing slash.
130THUMBNAILS_URL = MEDIA_URL + "thumbnails/"
131
132# Cookie used for session is temporary and is deleted when browser is closed
133SESSION_EXPIRE_AT_BROWSER_CLOSE = True
134
135# Add user, messages and perms variables in RequestContext
136TEMPLATE_CONTEXT_PROCESSORS = (
137        "django.contrib.auth.context_processors.auth",
138        "django.core.context_processors.debug",
139        "django.core.context_processors.i18n",
140        "django.core.context_processors.media",
141        "django.core.context_processors.request",
142        )
143
144
145
146#: expeditor's mail used when sending notification emails
147EMAIL_OPENPLM = "no-reply@openplm.example.com"
148
149#: Max file size for documents in bytes, -1 means illimited
150MAX_FILE_SIZE = -1
151
152# search stuff
153if "rebuild_index" not in sys.argv:
154    HAYSTACK_ENABLE_REGISTRATIONS = False
155HAYSTACK_SITECONF = 'openPLM.plmapp.search_sites'
156HAYSTACK_SEARCH_ENGINE = 'xapian'
157# use a memory backend
158HAYSTACK_XAPIAN_PATH = ":memory:"
159# the memory backend does not support spelling
160HAYSTACK_INCLUDE_SPELLING = False
161EXTRACTOR = os.path.abspath(os.path.join(os.path.dirname(__file__), "bin", "extractor.sh"))
162
163# celery stuff
164import djcelery
165djcelery.setup_loader()
166
167BROKER_BACKEND = "memory"
168CELERY_ALWAYS_EAGER = True
169
170COMPANY = "company"
171
172TEST_RUNNER = "openPLM.plmapp.tests.runner.OpenPLMTestSuiteRunner"
173TEST_OUTPUT_DIR = "tests_results"
174
Note: See TracBrowser for help on using the repository browser.