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