1 # Copyright (c) 2017 Wind River Systems, Inc.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
18 # Quick-start development settings - unsuitable for production
19 # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
21 # SECURITY WARNING: keep the secret key used in production secret!
22 SECRET_KEY = '3o-wney!99y)^h3v)0$j16l9=fdjxcb+a8g+q3tfbahcnu2b0o'
24 # SECURITY WARNING: don't run with debug turned on in production!
29 # Application definition
32 'django.contrib.auth',
33 'django.contrib.contenttypes',
34 'django.contrib.sessions',
35 'django.contrib.messages',
36 'django.contrib.staticfiles',
38 'multivimbroker.pub.database',
41 MIDDLEWARE_CLASSES = [
42 'django.middleware.security.SecurityMiddleware',
43 'django.contrib.sessions.middleware.SessionMiddleware',
44 'django.middleware.common.CommonMiddleware',
45 'django.middleware.csrf.CsrfViewMiddleware',
46 'django.contrib.auth.middleware.AuthenticationMiddleware',
47 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
48 'django.contrib.messages.middleware.MessageMiddleware',
49 'django.middleware.clickjacking.XFrameOptionsMiddleware',
52 ROOT_URLCONF = 'multivimbroker.urls'
54 WSGI_APPLICATION = 'multivimbroker.wsgi.application'
57 'DEFAULT_RENDERER_CLASSES': (
58 'rest_framework.renderers.JSONRenderer',
61 'DEFAULT_PARSER_CLASSES': (
62 'rest_framework.parsers.JSONParser',
63 'rest_framework.parsers.MultiPartParser',
64 # 'rest_framework.parsers.FormParser',
65 # 'rest_framework.parsers.FileUploadParser',
71 'ENGINE': 'django.db.backends.sqlite3',
72 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
76 # CACHE_BACKEND = 'redis_cache.cache://%s@%s:%s' % (REDIS_PASSWD, REDIS_HOST, REDIS_PORT)
80 # Static files (CSS, JavaScript, Images)
81 # https://docs.djangoproject.com/en/1.6/howto/static-files/
83 STATIC_URL = '/static/'
87 'disable_existing_loggers': True,
90 'format': '%(asctime)s:[%(name)s]:[%(filename)s]-[%(lineno)d] [%(levelname)s]:%(message)s',
96 'multivimbroker_handler': {
98 'class': 'logging.handlers.RotatingFileHandler',
99 'filename': os.path.join(BASE_DIR, 'logs/runtime_multivimbroker.log'),
100 'formatter': 'standard',
101 'maxBytes': 1024 * 1024 * 50,
108 'handlers': ['multivimbroker_handler'],
115 if 'test' in sys.argv:
116 from multivimbroker.pub.config import config
117 config.REG_TO_MSB_WHEN_START = False
119 DATABASES['default'] = {
120 'ENGINE': 'django.db.backends.sqlite3',
126 if platform.system() == 'Linux':
127 TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner'
128 TEST_OUTPUT_VERBOSE = True
129 TEST_OUTPUT_DESCRIPTIONS = True
130 TEST_OUTPUT_DIR = 'test-reports'