Skip to content

Commit 1b29184

Browse files
committed
chore: update to latest template
1 parent 190e93a commit 1b29184

3 files changed

Lines changed: 53 additions & 30 deletions

File tree

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Python
2+
*.pyc
3+
*.pyo
4+
db.sqlite3
5+
6+
# Django
7+
/staticfiles_collected/
8+
9+
# Divio
10+
.divio
11+
/data.tar.gz
12+
/data
13+
14+
15+
# OS-specific patterns - add your own here
16+
.DS_Store
17+
.DS_Store?
18+
._*
19+
.Spotlight-V100
20+
.Trashes
21+
22+
.idea/
23+
.env

LICENSE

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
Copyright (c) 2024, Divio AG
2-
All rights reserved.
1+
MIT License
32

4-
Redistribution and use in source and binary forms, with or without
5-
modification, are permitted provided that the following conditions are met:
6-
* Redistributions of source code must retain the above copyright
7-
notice, this list of conditions and the following disclaimer.
8-
* Redistributions in binary form must reproduce the above copyright
9-
notice, this list of conditions and the following disclaimer in the
10-
documentation and/or other materials provided with the distribution.
11-
* Neither the name of Divio AG nor the
12-
names of its contributors may be used to endorse or promote products
13-
derived from this software without specific prior written permission.
3+
Copyright (c) 2021 Divio
144

15-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18-
DISCLAIMED. IN NO EVENT SHALL DIVIO AG BE LIABLE FOR ANY DIRECT, INDIRECT,
19-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
23-
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24-
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

backend/settings.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88

99

1010
# SECURITY WARNING: keep the secret key used in production secret!
11-
SECRET_KEY = os.environ.get('SECRET_KEY', 'changeme')
11+
SECRET_KEY = os.environ.get('SECRET_KEY', '<a string of random characters>')
1212

1313
# SECURITY WARNING: don't run with debug turned on in production!
14-
DEBUG = os.environ.get('DEBUG', 'False') == 'True'
14+
DEBUG = os.environ.get('DEBUG') == "True"
1515

16-
ALLOWED_HOSTS = ["*"]
1716
CSRF_TRUSTED_ORIGINS=["https://*.aldryn.io"]
17+
ALLOWED_HOSTS = [os.environ.get('DOMAIN'),]
18+
if DEBUG:
19+
ALLOWED_HOSTS = ["*",]
1820

1921
# Redirect to HTTPS by default, unless explicitly disabled
20-
SECURE_SSL_REDIRECT = False
22+
SECURE_SSL_REDIRECT = os.environ.get('SECURE_SSL_REDIRECT') != "False"
2123

2224
X_FRAME_OPTIONS = 'SAMEORIGIN'
2325

@@ -132,12 +134,12 @@
132134
)
133135

134136
CMS_TEMPLATES = [
137+
# Default template that extend base.html, to be used with Bootstrap 5
138+
('bootstrap5.html', 'Bootstrap 5 Demo'),
139+
135140
# a minimal template to get started with
136141
('minimal.html', 'Minimal template'),
137142

138-
# optional templates that extend base.html, to be used with Bootstrap 5
139-
('bootstrap5.html', 'Bootstrap 5 Demo'),
140-
141143
('whitenoise-static-files-demo.html', 'Static File Demo'),
142144
]
143145

@@ -204,6 +206,7 @@
204206

205207
STATIC_URL = '/static/'
206208
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_collected')
209+
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
207210

208211

209212
# AWS S3 storage configuration
@@ -258,7 +261,7 @@
258261

259262
SITE_ID = 1
260263

261-
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
264+
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
262265

263266
CMS_CONFIRM_VERSION4 = True
264267
DJANGOCMS_VERSIONING_ALLOW_DELETING_VERSIONS = True

0 commit comments

Comments
 (0)