-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.py
More file actions
115 lines (96 loc) · 3.16 KB
/
settings.py
File metadata and controls
115 lines (96 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
"""
Django settings for Aesthetic Computation website.
To update static files:
(1) sudo -s
(2) python3 manage_ac.py collectstatic
(3) exit
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import aesthetic_computation.secauth as secauth
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DEBUG = False # change to False for production
ALLOWED_HOSTS = ['.aesthetic-computation.com']
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.staticfiles',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.messages',
'django.contrib.admin',
'pipeline',
'aesthetic_computation',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
TEMPLATES = [
{'BACKEND' : 'django.template.backends.django.DjangoTemplates',
'DIRS' : [os.path.join(BASE_DIR,'templates')],
'APP_DIRS' : True,
'OPTIONS' : {
'context_processors' : [
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.static',
'django.template.context_processors.request',
],
'debug' : DEBUG
}
}
]
ROOT_URLCONF = 'aesthetic_computation.urls'
WSGI_APPLICATION = 'aesthetic_computation.wsgi.application'
MEDIA_ROOT = "/var/www/html/static/ac/projects/"
MEDIA_URL = "https://www.aesthetic-computation.com/static/ac/projects/"
# Database config ( https://docs.djangoproject.com/en/1.6/ref/settings/#databases )
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'djangodb_ac',
'USER': 'djangouser_ac',
'PASSWORD': secauth.ac_dbpass,
'OPTIONS': {'unix_socket':'/var/lib/mysql/mysql.sock'}
}
}
SECRET_KEY = secauth.sec_key
#ADMINS = (('Dylan Nelson','dnelson@uni-heidelberg.de'))
PREPEND_WWW = True
# Internationalization ( https://docs.djangoproject.com/en/1.6/topics/i18n/ )
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
PIPELINE = {
'DISABLE_WRAPPER' : True,
'STYLESHEETS' : {
'base' : {
'source_filenames' : ( 'ac/css/bootstrap.min.css',
'ac/css/style.css' ),
'output_filename' : 'min/ac.css'
},
},
'JAVASCRIPT' : {
'base' : {
'source_filenames' : ( 'ac/js/jquery.min.js',
'ac/js/site.js' ),
'output_filename' : 'min/ac.js'
},
}
}
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
BASE_WEB_ADDR = "https://www.aesthetic-computation.com/"
STATIC_URL = "/static/"
STATIC_ROOT = "/srv/www/html/static/" # where collectstatic puts things