##// END OF EJS Templates
Update configs
jespinoza -
r9:2e29893b10f5
parent child
Show More
@@ -1,25 +1,25
1 # general
1 # general
2 .env
2 .env
3 .DS_store
3 .DS_store
4 *.pyc
4 *.pyc
5 *.sqlite
5 *.sqlite
6 # config
6 # config
7 madrigal.cfg
7 madrigal.cfg
8 # metadata
8 # metadata
9 siteTab.txt
9 siteTab.txt
10 expTab.txt
10 expTab.txt
11 expTabAll.txt
11 expTabAll.txt
12 fileTab.txt
12 fileTab.txt
13 fileTabAll.txt
13 fileTabAll.txt
14 instData.txt
14 instData.txt
15 instDataPriv.txt
15 instDataPriv.txt
16 instParmLastUpdate.txt
16 instParmLastUpdate.txt
17 instTab.txt
17 instTab.txt
18 instType.txt
18 instType.txt
19 siteTab.txt
19 siteTab.txt
20 typeTab.txt
20 typeTab.txt
21 instKindatTab.txt
21 instKindatTab.txt
22 instParmTab.txt
22 instParmTab.txt
23 parmCodes.txt
23 parmCodes.txt
24 # experiments
25 experiments/
24 experiments/
25 static_files/ No newline at end of file
@@ -1,17 +1,17
1 FROM python:3.7-slim
1 FROM python:3.7-slim
2
2
3 RUN mkdir /madrigal
3 RUN mkdir /madrigal
4
4
5 WORKDIR /madrigal
5 WORKDIR /madrigal
6
6
7 ADD required_modules.txt ./required_modules.txt
7 ADD required_modules.txt ./required_modules.txt
8
8
9 RUN apt clean && apt update && apt install -y --no-install-recommends \
9 RUN apt clean && apt update && apt install -y --no-install-recommends \
10 gcc gfortran build-essential automake autotools-dev autoconf m4 libtool hdf5-tools\
10 gcc gfortran build-essential automake autotools-dev autoconf m4 libtool hdf5-tools libhdf5-dev libnetcdf-dev pkg-config\
11 && rm -rf /var/lib/apt/lists/*\
11 && rm -rf /var/lib/apt/lists/*\
12 && pip install -r required_modules.txt && pip install django-bootstrap3
12 && pip install -r required_modules.txt && pip install django-bootstrap3
13
13
14 COPY . ./
14 COPY . ./
15
15
16 RUN ln -s /usr/local/bin/python3.7 /madrigal/bin/python && bash installMadrigal
16 RUN ln -s /usr/local/bin/python3.7 /madrigal/bin/python && bash installMadrigal
17
17
@@ -1,31 +1,27
1 version: '3'
1 version: '3'
2
2
3 services:
3 services:
4 web:
4 web:
5 container_name: 'madrigal'
5 container_name: 'madrigal'
6 build: .
6 build: .
7 restart: always
7 restart: always
8 image: madrigal
8 image: madrigal
9 working_dir: /madrigal/source/madpy/djangoMad
9 working_dir: /madrigal/source/madpy/djangoMad
10 command: gunicorn djangoMad.wsgi --bind 0.0.0.0:8000
10 command: gunicorn djangoMad.wsgi --bind 0.0.0.0:8000
11 # command: python manage.py runserver 0.0.0.0:8888
12 env_file: .env
11 env_file: .env
13 # ports:
14 # - 8888:8888
15 volumes:
12 volumes:
16 - '${EXP_DIR}:/madrigal/experiments'
13 - '${EXP_DIR}:/madrigal/experiments'
17 # - '/usr/local/madrigal/metadata:/madrigal/metadata'
14 - './source/madpy/djangoMad:/madrigal/source/madpy/djangoMad'
18 - '/home/jespinoza/workspace/madrigal/source/madpy/djangoMad:/madrigal/source/madpy/djangoMad'
19
15
20 nginx:
16 nginx:
21 container_name: 'madrigal-nginx'
17 container_name: 'madrigal-nginx'
22 image: nginx:1.15-alpine
18 image: nginx:1.15-alpine
23 volumes:
19 volumes:
24 - ./source/madpy/djangoMad/madweb/static:/static
20 - ./source/madpy/djangoMad/static_files:/static
25 - ./nginx:/etc/nginx/conf.d
21 - ./nginx:/etc/nginx/conf.d
26 ports:
22 ports:
27 - "${MAD_PORT}:8080"
23 - "${MAD_PORT}:8080"
28 depends_on:
24 depends_on:
29 - web
25 - web
30 command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
26 command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
31
27
@@ -1,299 +1,299
1 #!/bin/sh
1 #!/bin/sh
2 #
2 #
3 # This script installs the entire Madrigal database.
3 # This script installs the entire Madrigal database.
4 # Use -c to skip conversion from Madrigal 2->3 files
4 # Use -c to skip conversion from Madrigal 2->3 files
5 #
5 #
6 # See the latest documentation at http://madrigal.haystack.mit.edu/madrigal/admin.html
6 # See the latest documentation at http://madrigal.haystack.mit.edu/madrigal/admin.html
7 # for the latest installation instructions
7 # for the latest installation instructions
8 #
8 #
9 # $Id: installMadrigal 7342 2021-03-29 13:53:30Z brideout $
9 # $Id: installMadrigal 7342 2021-03-29 13:53:30Z brideout $
10
10
11 function timer()
11 function timer()
12 {
12 {
13 if [[ $# -eq 0 ]]; then
13 if [[ $# -eq 0 ]]; then
14 echo $(date '+%s')
14 echo $(date '+%s')
15 else
15 else
16 local stime=$1
16 local stime=$1
17 etime=$(date '+%s')
17 etime=$(date '+%s')
18
18
19 if [[ -z "$stime" ]]; then stime=$etime; fi
19 if [[ -z "$stime" ]]; then stime=$etime; fi
20
20
21 dt=$((etime - stime))
21 dt=$((etime - stime))
22 ds=$((dt % 60))
22 ds=$((dt % 60))
23 dm=$(((dt / 60) % 60))
23 dm=$(((dt / 60) % 60))
24 dh=$((dt / 3600))
24 dh=$((dt / 3600))
25 printf '%d:%02d:%02d' $dh $dm $ds
25 printf '%d:%02d:%02d' $dh $dm $ds
26 fi
26 fi
27 }
27 }
28
28
29 tmr=$(timer)
29 tmr=$(timer)
30
30
31 # verify we are indeed in the right pwd
31 # verify we are indeed in the right pwd
32 if [ ! -f installMadrigal ]
32 if [ ! -f installMadrigal ]
33 then
33 then
34 echo "You must run this script from the MADROOT directory"
34 echo "You must run this script from the MADROOT directory"
35 exit -1
35 exit -1
36 fi
36 fi
37
37
38 # if MADROOT is set, be sure it matches PWD
38 # if MADROOT is set, be sure it matches PWD
39 if [ "$MADROOT" != "" ]
39 if [ "$MADROOT" != "" ]
40 then
40 then
41 if [ $MADROOT != $PWD ]
41 if [ $MADROOT != $PWD ]
42 then
42 then
43 echo "Environmental variable MADROOT = $MADROOT does not match PWD = $PWD"
43 echo "Environmental variable MADROOT = $MADROOT does not match PWD = $PWD"
44 exit -1
44 exit -1
45 fi
45 fi
46 else
46 else
47 export MADROOT=$PWD
47 export MADROOT=$PWD
48 fi
48 fi
49
49
50 # test that h5repack installed
50 # test that h5repack installed
51 path_to_executable=$(which h5repack)
51 path_to_executable=$(which h5repack)
52 if [ -x "$path_to_executable" ] ; then
52 if [ -x "$path_to_executable" ] ; then
53 echo "h5repack installed"
53 echo "h5repack installed"
54 else
54 else
55 echo "h5repack needs to be installed"
55 echo "h5repack needs to be installed"
56 exit -1
56 exit -1
57 fi
57 fi
58
58
59
59
60 # check whether test experiments have been installed
60 # check whether test experiments have been installed
61 if [[ (! -f experiments/1998/mlh/20jan98/mil980120g.002 ) && ( ! -f experiments/1998/mlh/20jan98/mil980120g.002.hdf5) && ( ! -f experiments/1998/mlh/20jan98/mlh980120g.002.hdf5) ]]
61 if [[ (! -f experiments/1998/mlh/20jan98/mil980120g.002 ) && ( ! -f experiments/1998/mlh/20jan98/mil980120g.002.hdf5) && ( ! -f experiments/1998/mlh/20jan98/mlh980120g.002.hdf5) ]]
62 then
62 then
63 echo "The standard test data must be installed before installing Madrigal"
63 echo "The standard test data must be installed before installing Madrigal"
64 echo "See install instructions at http://madrigal.haystack.mit.edu/madrigal/ad_install.html"
64 echo "See install instructions at http://madrigal.haystack.mit.edu/madrigal/ad_install.html"
65 echo "Standard test experiments can be found at http://madrigal.haystack.mit.edu/madrigal/madDownload.html"
65 echo "Standard test experiments can be found at http://madrigal.haystack.mit.edu/madrigal/madDownload.html"
66 exit -1
66 exit -1
67 fi
67 fi
68
68
69 # check if should convert to Madrigal3
69 # check if should convert to Madrigal3
70 convert=1
70 convert=1
71 if [ $# -gt 0 ]
71 if [ $# -gt 0 ]
72 then
72 then
73 for arg in $@
73 for arg in $@
74 do
74 do
75 if [ $arg = "-c" ]
75 if [ $arg = "-c" ]
76 then
76 then
77 convert=0
77 convert=0
78 fi
78 fi
79 done
79 done
80 fi
80 fi
81
81
82 echo "Testing that all required python modules are already installed in the default python 3"
82 echo "Testing that all required python modules are already installed in the default python 3"
83 $MADROOT/bin/python testRequirements.py
83 $MADROOT/bin/python testRequirements.py
84 if [ $? -ne 0 ]
84 if [ $? -ne 0 ]
85 then
85 then
86 exit -1
86 exit -1
87 fi
87 fi
88
88
89
89
90 echo "Installing Madrigal in $MADROOT"
90 echo "Installing Madrigal in $MADROOT"
91
91
92 # verify correctness of madrigal.cfg
92 # verify correctness of madrigal.cfg
93 if [ ! -f madrigal.cfg ]
93 if [ ! -f madrigal.cfg ]
94 then
94 then
95 echo
95 echo
96 echo "madrigal.cfg must be created first by copying madrigal.cfg.template and editing as needed"
96 echo "madrigal.cfg must be created first by copying madrigal.cfg.template and editing as needed"
97 exit -1
97 exit -1
98 else
98 else
99 $MADROOT/bin/python checkConfig.py
99 $MADROOT/bin/python checkConfig.py
100 if [ $? -ne 0 ]
100 if [ $? -ne 0 ]
101 then
101 then
102 exit -1
102 exit -1
103 fi
103 fi
104 fi
104 fi
105
105
106 # Set all file permissions to owner and group write
106 # Set all file permissions to owner and group write
107 echo "********** setPermissions **********"
107 echo "********** setPermissions **********"
108 $MADROOT/bin/python setPermissions.py
108 $MADROOT/bin/python setPermissions.py
109 if [ $? -ne 0 ]
109 if [ $? -ne 0 ]
110 then
110 then
111 exit -1
111 exit -1
112 fi
112 fi
113
113
114 echo "********** configureSource **********"
114 echo "********** configureSource **********"
115 $MADROOT/bin/python configureSource.py
115 $MADROOT/bin/python configureSource.py
116 if [ $? -ne 0 ]
116 if [ $? -ne 0 ]
117 then
117 then
118 exit -1
118 exit -1
119 fi
119 fi
120
120
121 # Compile the Libraries and Programs
121 # Compile the Libraries and Programs
122 # ----------------------------------
122 # ----------------------------------
123 cd source
123 cd source
124
124
125
125
126 echo "********** rebuilding dist with autotools **********"
126 echo "********** rebuilding dist with autotools **********"
127 aclocal
127 aclocal
128 if [ $? -ne 0 ]
128 if [ $? -ne 0 ]
129 then
129 then
130 exit -1
130 exit -1
131 fi
131 fi
132 autoconf
132 autoconf
133 if [ $? -ne 0 ]
133 if [ $? -ne 0 ]
134 then
134 then
135 exit -1
135 exit -1
136 fi
136 fi
137 libtoolize
137 libtoolize
138 if [ $? -ne 0 ]
138 if [ $? -ne 0 ]
139 then
139 then
140 exit -1
140 exit -1
141 fi
141 fi
142 autoheader
142 autoheader
143 if [ $? -ne 0 ]
143 if [ $? -ne 0 ]
144 then
144 then
145 exit -1
145 exit -1
146 fi
146 fi
147 automake --add-missing
147 automake --add-missing
148 if [ $? -ne 0 ]
148 if [ $? -ne 0 ]
149 then
149 then
150 exit -1
150 exit -1
151 fi
151 fi
152
152
153 echo "********** ./configure **********"
153 echo "********** ./configure **********"
154 ./configure --prefix=$MADROOT
154 ./configure --prefix=$MADROOT FFLAGS=-std=legacy
155 if [ $? -ne 0 ]
155 if [ $? -ne 0 ]
156 then
156 then
157 exit -1
157 exit -1
158 fi
158 fi
159
159
160 echo "********** make clean **********"
160 echo "********** make clean **********"
161 make clean
161 make clean
162 if [ $? -ne 0 ]
162 if [ $? -ne 0 ]
163 then
163 then
164 exit -1
164 exit -1
165 fi
165 fi
166
166
167 echo "********** make **********"
167 echo "********** make **********"
168 make
168 make
169 if [ $? -ne 0 ]
169 if [ $? -ne 0 ]
170 then
170 then
171 exit -1
171 exit -1
172 fi
172 fi
173
173
174 echo "********** make check **********"
174 echo "********** make check **********"
175 make check
175 make check
176 if [ $? -ne 0 ]
176 if [ $? -ne 0 ]
177 then
177 then
178 exit -1
178 exit -1
179 fi
179 fi
180
180
181 echo "********** make install **********"
181 echo "********** make install **********"
182 make install
182 make install
183 if [ $? -ne 0 ]
183 if [ $? -ne 0 ]
184 then
184 then
185 exit -1
185 exit -1
186 fi
186 fi
187
187
188 cd ..
188 cd ..
189
189
190
190
191 echo "********** configureScripts **********"
191 echo "********** configureScripts **********"
192 $MADROOT/bin/python configureScripts.py
192 $MADROOT/bin/python configureScripts.py
193 if [ $? -ne 0 ]
193 if [ $? -ne 0 ]
194 then
194 then
195 exit -1
195 exit -1
196 fi
196 fi
197
197
198 echo "********** Installing bootstrap calendar **********"
198 echo "********** Installing bootstrap calendar **********"
199 cd source/madpy/djangoMad/bootstrap_calendar/dist
199 cd source/madpy/djangoMad/bootstrap_calendar/dist
200 rm -rf django-bootstrap-calendar-0.1.0
200 rm -rf django-bootstrap-calendar-0.1.0
201 tar -xzf django-bootstrap-calendar-0.1.0.tar.gz
201 tar -xzf django-bootstrap-calendar-0.1.0.tar.gz
202 cd django-bootstrap-calendar-0.1.0
202 cd django-bootstrap-calendar-0.1.0
203 $MADROOT/bin/python setup.py install
203 $MADROOT/bin/python setup.py install
204 if [ $? -ne 0 ]
204 if [ $? -ne 0 ]
205 then
205 then
206 exit -1
206 exit -1
207 fi
207 fi
208 cd ../../../../../..
208 cd ../../../../../..
209
209
210
210
211
211
212 echo "********** Installing madrigal python library **********"
212 echo "********** Installing madrigal python library **********"
213 cd source/madpy
213 cd source/madpy
214 rm -f -r build
214 rm -f -r build
215 $MADROOT/bin/python setup.py install
215 $MADROOT/bin/python setup.py install
216 if [ $? -ne 0 ]
216 if [ $? -ne 0 ]
217 then
217 then
218 exit -1
218 exit -1
219 fi
219 fi
220 rm -f -r build
220 rm -f -r build
221
221
222 echo "********** Installing madrigalWeb python library **********"
222 echo "********** Installing madrigalWeb python library **********"
223 cd madrigalWeb
223 cd madrigalWeb
224 rm -f -r build
224 rm -f -r build
225 $MADROOT/bin/python setup.py install
225 $MADROOT/bin/python setup.py install
226 if [ $? -ne 0 ]
226 if [ $? -ne 0 ]
227 then
227 then
228 exit -1
228 exit -1
229 fi
229 fi
230 cd ../../..
230 cd ../../..
231
231
232 echo "********** Verifying this site is set to at least 3 in siteTab.txt **********"
232 echo "********** Verifying this site is set to at least 3 in siteTab.txt **********"
233 $MADROOT/bin/python source/madpy/scripts/bin/checkSiteIs3.py
233 $MADROOT/bin/python source/madpy/scripts/bin/checkSiteIs3.py
234 if [ $? -ne 0 ]
234 if [ $? -ne 0 ]
235 then
235 then
236 exit -1
236 exit -1
237 fi
237 fi
238
238
239
239
240 # Install Experiments
240 # Install Experiments
241 # -------------------
241 # -------------------
242 echo "********** configureExperiments **********"
242 echo "********** configureExperiments **********"
243 chmod +x configureExperiments
243 chmod +x configureExperiments
244 ./configureExperiments
244 ./configureExperiments
245 if [ $? -ne 0 ]
245 if [ $? -ne 0 ]
246 then
246 then
247 exit -1
247 exit -1
248 fi
248 fi
249
249
250 # Update metadata
250 # Update metadata
251 # -------------------
251 # -------------------
252 echo "********** Updating metadata tables **********"
252 echo "********** Updating metadata tables **********"
253 chmod +x -R bin/
253 chmod +x -R bin/
254 bin/updateMaster
254 bin/updateMaster
255 if [ $? -ne 0 ]
255 if [ $? -ne 0 ]
256 then
256 then
257 exit -1
257 exit -1
258 fi
258 fi
259 echo "********** The following script will create all the summary and hdf5 files needed **********"
259 echo "********** The following script will create all the summary and hdf5 files needed **********"
260 bin/rebuildInstParmTab.py
260 bin/rebuildInstParmTab.py
261 if [ $? -ne 0 ]
261 if [ $? -ne 0 ]
262 then
262 then
263 exit -1
263 exit -1
264 fi
264 fi
265
265
266 if [ $convert = 1 ]
266 if [ $convert = 1 ]
267 then
267 then
268 bin/convertToMadrigal3.py --numCPU=2
268 bin/convertToMadrigal3.py --numCPU=2
269 if [ $? -ne 0 ]
269 if [ $? -ne 0 ]
270 then
270 then
271 exit -1
271 exit -1
272 fi
272 fi
273 fi
273 fi
274
274
275
275
276 # Test the Libraries and Programs
276 # Test the Libraries and Programs
277 echo "********** Testing installation **********"
277 echo "********** Testing installation **********"
278 # ------------------------------
278 # ------------------------------
279 bin/testGeolib
279 bin/testGeolib
280 if [ $? -ne 0 ]
280 if [ $? -ne 0 ]
281 then
281 then
282 exit -1
282 exit -1
283 fi
283 fi
284 echo "--diff testGeolib.out source/madf/geolib/testGeolib.out.rock"
284 echo "--diff testGeolib.out source/madf/geolib/testGeolib.out.rock"
285 diff testGeolib.out source/madf/geolib/testGeolib.out.rock
285 diff testGeolib.out source/madf/geolib/testGeolib.out.rock
286
286
287 echo "running test on Madrigal web services..."
287 echo "running test on Madrigal web services..."
288 bin/python source/madpy/madrigalWeb/madrigalWeb/examples/testMadrigalWebServices.py
288 bin/python source/madpy/madrigalWeb/madrigalWeb/examples/testMadrigalWebServices.py
289
289
290 echo "checking whether the web server needs extra configuration"
290 echo "checking whether the web server needs extra configuration"
291 bin/python source/madpy/scripts/bin/testWebConfig.py
291 bin/python source/madpy/scripts/bin/testWebConfig.py
292
292
293
293
294 # Install complete
294 # Install complete
295 # ---------------------
295 # ---------------------
296 echo ""
296 echo ""
297 printf 'Elapsed time: %s\n' $(timer $tmr)
297 printf 'Elapsed time: %s\n' $(timer $tmr)
298 echo "Madrigal installation complete"
298 echo "Madrigal installation complete"
299
299
@@ -1,138 +1,139
1 """
1 """
2 Django settings for djangoMad project.
2 Django settings for djangoMad project.
3
3
4 For more information on this file, see
4 For more information on this file, see
5 https://docs.djangoproject.com/en/1.7/topics/settings/
5 https://docs.djangoproject.com/en/1.7/topics/settings/
6
6
7 For the full list of settings and their values, see
7 For the full list of settings and their values, see
8 https://docs.djangoproject.com/en/1.7/ref/settings/
8 https://docs.djangoproject.com/en/1.7/ref/settings/
9 """
9 """
10
10
11 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
11 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12 import os
12 import os
13 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
13 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
14
14
15 # Quick-start development settings - unsuitable for production
15 # Quick-start development settings - unsuitable for production
16 # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
16 # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
17
17
18 # SECURITY WARNING: keep the secret key used in production secret!
18 # SECURITY WARNING: keep the secret key used in production secret!
19 SECRET_KEY = '^c1l3d35+q28^66d2pc1qlu(k$wmw^*gg3rfitz^s)t=9eu1ui'
19 SECRET_KEY = '^c1l3d35+q28^66d2pc1qlu(k$wmw^*gg3rfitz^s)t=9eu1ui'
20
20
21 # SECURITY WARNING: don't run with debug turned on in production!
21 # SECURITY WARNING: don't run with debug turned on in production!
22 DEBUG = True
22 DEBUG = True
23
23
24
24
25 ALLOWED_HOSTS = ['localhost:8000', '127.0.0.1', 'localhost', '10.10.120.60']
25 ALLOWED_HOSTS = ['localhost:8000', '127.0.0.1', 'localhost', '10.10.120.60']
26
26
27 ADMINS = (('Bill Rideout', 'brideout@haystack.mit.edu'),)
27 ADMINS = (('Bill Rideout', 'brideout@haystack.mit.edu'),)
28
28
29 EMAIL_HOST = 'hyperion.haystack.mit.edu'
29 EMAIL_HOST = 'hyperion.haystack.mit.edu'
30
30
31 SEND_BROKEN_LINK_EMAILS = True
31 SEND_BROKEN_LINK_EMAILS = True
32
32
33 MANAGERS = (('Bill Rideout', 'brideout@haystack.mit.edu'),)
33 MANAGERS = (('Bill Rideout', 'brideout@haystack.mit.edu'),)
34
34
35
35
36 # Application definition
36 # Application definition
37
37
38 INSTALLED_APPS = (
38 INSTALLED_APPS = (
39 'django.contrib.admin',
39 'django.contrib.admin',
40 'django.contrib.auth',
40 'django.contrib.auth',
41 'django.contrib.contenttypes',
41 'django.contrib.contenttypes',
42 'django.contrib.sessions',
42 'django.contrib.sessions',
43 'django.contrib.messages',
43 'django.contrib.messages',
44 'django.contrib.staticfiles',
44 'django.contrib.staticfiles',
45 'madweb',
45 'madweb',
46 'django_bootstrap_calendar',
46 'django_bootstrap_calendar',
47 'bootstrap3',
47 'bootstrap3',
48 'apps.login',
48 'apps.login',
49 'apps.updata',
49 'apps.updata',
50 )
50 )
51
51
52 MIDDLEWARE = [
52 MIDDLEWARE = [
53 'django.middleware.security.SecurityMiddleware',
53 'django.middleware.security.SecurityMiddleware',
54 'django.contrib.sessions.middleware.SessionMiddleware',
54 'django.contrib.sessions.middleware.SessionMiddleware',
55 'django.middleware.common.CommonMiddleware',
55 'django.middleware.common.CommonMiddleware',
56 'django.middleware.csrf.CsrfViewMiddleware',
56 'django.middleware.csrf.CsrfViewMiddleware',
57 'django.contrib.auth.middleware.AuthenticationMiddleware',
57 'django.contrib.auth.middleware.AuthenticationMiddleware',
58 'django.contrib.messages.middleware.MessageMiddleware',
58 'django.contrib.messages.middleware.MessageMiddleware',
59 'django.middleware.clickjacking.XFrameOptionsMiddleware',
59 'django.middleware.clickjacking.XFrameOptionsMiddleware',
60 ]
60 ]
61
61
62 ROOT_URLCONF = 'djangoMad.urls'
62 ROOT_URLCONF = 'djangoMad.urls'
63
63
64 WSGI_APPLICATION = 'djangoMad.wsgi.application'
64 WSGI_APPLICATION = 'djangoMad.wsgi.application'
65
65
66
66
67 TEMPLATES = [
67 TEMPLATES = [
68 {
68 {
69 'BACKEND': 'django.template.backends.django.DjangoTemplates',
69 'BACKEND': 'django.template.backends.django.DjangoTemplates',
70 'DIRS': [
70 'DIRS': [
71 os.path.join(BASE_DIR, "templates"),
71 os.path.join(BASE_DIR, "templates"),
72 ],
72 ],
73 'APP_DIRS': True,
73 'APP_DIRS': True,
74 'OPTIONS': {
74 'OPTIONS': {
75 'context_processors': [
75 'context_processors': [
76 'django.contrib.auth.context_processors.auth',
76 'django.contrib.auth.context_processors.auth',
77 'django.template.context_processors.debug',
77 'django.template.context_processors.debug',
78 'django.template.context_processors.i18n',
78 'django.template.context_processors.i18n',
79 'django.template.context_processors.media',
79 'django.template.context_processors.media',
80 'django.template.context_processors.static',
80 'django.template.context_processors.static',
81 'django.template.context_processors.tz',
81 'django.template.context_processors.tz',
82 'django.contrib.messages.context_processors.messages',
82 'django.contrib.messages.context_processors.messages',
83 'django.template.context_processors.request',
83 'django.template.context_processors.request',
84 ],
84 ],
85 },
85 },
86 },
86 },
87 ]
87 ]
88
88
89
89
90 # Database
90 # Database
91 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
91 # https://docs.djangoproject.com/en/1.7/ref/settings/#databases
92
92
93 DATABASES = {
93 DATABASES = {
94 'default': {
94 'default': {
95 'ENGINE': 'django.db.backends.sqlite3',
95 'ENGINE': 'django.db.backends.sqlite3',
96 'NAME': 'madrigal.sqlite',
96 'NAME': 'madrigal.sqlite',
97 }
97 }
98 }
98 }
99
99
100
100
101 # Internationalization
101 # Internationalization
102 # https://docs.djangoproject.com/en/1.7/topics/i18n/
102 # https://docs.djangoproject.com/en/1.7/topics/i18n/
103
103
104 LANGUAGE_CODE = 'en-us'
104 LANGUAGE_CODE = 'en-us'
105
105
106 TIME_ZONE = 'UTC'
106 TIME_ZONE = 'UTC'
107
107
108 USE_I18N = True
108 USE_I18N = True
109
109
110 USE_L10N = True
110 USE_L10N = True
111
111
112 USE_TZ = True
112 USE_TZ = True
113
113
114
114
115 # Absolute filesystem path to the directory that will hold user-uploaded files.
115 # Absolute filesystem path to the directory that will hold user-uploaded files.
116 # Example: "/home/media/media.lawrence.com/media/"
116 # Example: "/home/media/media.lawrence.com/media/"
117 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
117 MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
118
118
119 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
119 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
120 # trailing slash.
120 # trailing slash.
121 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
121 # Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
122 MEDIA_URL = '/media/'
122 MEDIA_URL = '/media/'
123
123
124 # Absolute path to the directory static files should be collected to.
124 # Absolute path to the directory static files should be collected to.
125 # Don't put anything in this directory yourself; store your static files
125 # Don't put anything in this directory yourself; store your static files
126 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
126 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
127 # Example: "/home/media/media.lawrence.com/static/"
127 # Example: "/home/media/media.lawrence.com/static/"
128 # STATIC_ROOT = os.path.join(BASE_DIR, 'static')
128 # STATIC_ROOT = os.path.join(BASE_DIR, 'static')
129
129
130 # URL prefix for static files.
130 # URL prefix for static files.
131 # Example: "http://media.lawrence.com/static/"
131 # Example: "http://media.lawrence.com/static/"
132 STATIC_URL = '/madrigal/static/'
132 STATIC_URL = '/madrigal/static/'
133 STATIC_ROOT = '/madrigal/source/madpy/djangoMad/static_files/'
133
134
134 BOOTSTRAP3 = {
135 BOOTSTRAP3 = {
135 # Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags)
136 # Include jQuery with Bootstrap JavaScript (affects django-bootstrap3 template tags)
136 'jquery_url': '/madrigal/static/jquery.min.js',
137 'jquery_url': '/madrigal/static/jquery.min.js',
137 'include_jquery': True,
138 'include_jquery': True,
138 }
139 }
General Comments 0
You need to be logged in to leave comments. Login now