-
Notifications
You must be signed in to change notification settings - Fork 102
Expand file tree
/
Copy pathsettings.py
More file actions
173 lines (144 loc) · 5.11 KB
/
settings.py
File metadata and controls
173 lines (144 loc) · 5.11 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# -*- coding: UTF-8 -*-
# vim: set expandtab sw=4 ts=4 sts=4:
#
# phpMyAdmin web site
#
# Copyright (C) 2008 - 2016 Michal Cihar <michal@cihar.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""
Django settings for pmaweb project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
https://django.readthedocs.io/en/1.7.x/topics/settings.html
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
https://django.readthedocs.io/en/1.7.x/ref/settings.html
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
ADMINS = (
('phpMyAdmin infra', 'infrastructure@phpmyadmin.net'),
)
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# https://django.readthedocs.io/en/1.7.x/howto/deployment/checklist.html
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'n$6di6axa*m5)$%yzhl6xhe%^b4t^)6#sbz_b5_7&ga@12(+_h'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = (
'127.0.0.1',
'web.phpmyadmin.net',
'www.phpmyadmin.net',
'web-backend.phpmyadmin.net',
'cdn.phpmyadmin.net',
)
# Application definition
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.sitemaps',
'compressor',
'files',
'news',
'security',
'translations',
'demo',
'pmaweb',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'pmaweb.context_processors.basic',
'pmaweb.context_processors.menu',
'pmaweb.context_processors.releases',
],
},
},
]
ROOT_URLCONF = 'pmaweb.urls'
WSGI_APPLICATION = 'pmaweb.wsgi.application'
SITE_ID = 1
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
# https://django.readthedocs.io/en/1.7.x/ref/databases.html
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
# https://django.readthedocs.io/en/1.7.x/topics/i18n/index.html
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/
# https://django.readthedocs.io/en/1.7.x/howto/static-files/
STATIC_URL = '/static/'
# Static files finders
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
)
# Location of download files
FILES_PATH = os.path.join(BASE_DIR, 'frs')
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
# Enable offline javascript/css compression
COMPRESS_OFFLINE = True
COMPRESS_CSS_FILTERS = [
'compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.CSSCompressorFilter',
]
# List of major versions to offer for download in descending order.
LISTED_BRANCHES = ('5.1','4.9')
CDN_LOGIN = 'admins@phpmyadmin.net'
CDN_PASSWORD = ''
CDN_ID = '41205'
FILES_CDN_ID = '40483'
DOCKERHUB_TOKEN = None
GITHUB_USER = 'phpmyadmin-bot'
GITHUB_TOKEN = None