· 7 years ago · Jul 12, 2018, 10:10 AM
1import os
2
3 BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
4
5 SECRET_KEY = ***
6
7 DEBUG = True
8
9 ALLOWED_HOSTS = ['127.0.0.1']
10
11
12 INSTALLED_APPS = [
13 'django_cassandra_engine',
14 'django.contrib.admin',
15 'django.contrib.auth',
16 'django.contrib.contenttypes',
17 'django.contrib.sessions',
18 'django.contrib.messages',
19 'django.contrib.staticfiles',
20 'bbt_monitor.apps.BbtMonitorConfig',
21 'rest_framework',
22 'django_nvd3',
23 ]
24
25 MIDDLEWARE = [
26 'django.middleware.security.SecurityMiddleware',
27 'django.contrib.sessions.middleware.SessionMiddleware',
28 'django.middleware.common.CommonMiddleware',
29 'django.middleware.csrf.CsrfViewMiddleware',
30 'django.contrib.auth.middleware.AuthenticationMiddleware',
31 'django.contrib.messages.middleware.MessageMiddleware',
32 'django.middleware.clickjacking.XFrameOptionsMiddleware',
33 ]
34
35 ROOT_URLCONF = 'project.urls'
36
37 TEMPLATES = [
38 {
39 'BACKEND': 'django.template.backends.django.DjangoTemplates',
40 'DIRS': [BASE_DIR+"/templates"],
41 'APP_DIRS': True,
42 'OPTIONS': {
43 'context_processors': [
44 'django.template.context_processors.debug',
45 'django.template.context_processors.request',
46 'django.contrib.auth.context_processors.auth',
47 'django.contrib.messages.context_processors.messages',
48 ],
49 },
50 },
51 ]
52
53 WSGI_APPLICATION = 'project.wsgi.application'
54
55 DATABASES = {
56 'default': {
57 'ENGINE': 'django_cassandra_engine',
58 'NAME': 'projectdb',
59 'TEST_NAME': 'test_projectdb',
60 'HOST': '127.0.0.1',
61 'OPTIONS': {
62 'replication': {
63 'strategy_class': 'SimpleStrategy',
64 'replication_factor': 1
65 }
66 }
67 }
68 }
69
70 AUTH_PASSWORD_VALIDATORS = [
71 {
72 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
73 },
74 {
75 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
76 },
77 {
78 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
79 },
80 {
81 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
82 },
83 ]
84
85
86 LANGUAGE_CODE = 'en-us'
87
88 TIME_ZONE = 'Europe/Madrid'
89
90 USE_I18N = True
91
92 USE_L10N = True
93
94 USE_TZ = True
95
96
97 STATIC_URL = '/static/'
98
99 STATICFILES_DIRS = (
100 os.path.join(BASE_DIR, 'static'),
101 )
102
103 STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
104
105 LANGUAGE_CODE = 'en-us'
106
107 TIME_ZONE = 'Europe/Madrid'
108
109 USE_I18N = True
110
111 USE_L10N = True
112
113 USE_TZ = True
114
115
116 # Static files (CSS, JavaScript, Images)
117 # https://docs.djangoproject.com/en/2.0/howto/static-files/
118
119 STATIC_URL = '/static/'
120
121 STATICFILES_DIRS = (
122 os.path.join(BASE_DIR, 'static'),
123 )
124
125 STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')