Skip to content

Commit

Permalink
chore: update to latest template
Browse files Browse the repository at this point in the history
  • Loading branch information
FinalAngel committed Jul 25, 2024
1 parent 190e93a commit 1b29184
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 30 deletions.
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Python
*.pyc
*.pyo
db.sqlite3

# Django
/staticfiles_collected/

# Divio
.divio
/data.tar.gz
/data


# OS-specific patterns - add your own here
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes

.idea/
.env
41 changes: 19 additions & 22 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
Copyright (c) 2024, Divio AG
All rights reserved.
MIT License

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

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL DIVIO AG BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 11 additions & 8 deletions backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@


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

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

ALLOWED_HOSTS = ["*"]
CSRF_TRUSTED_ORIGINS=["https://*.aldryn.io"]
ALLOWED_HOSTS = [os.environ.get('DOMAIN'),]
if DEBUG:
ALLOWED_HOSTS = ["*",]

# Redirect to HTTPS by default, unless explicitly disabled
SECURE_SSL_REDIRECT = False
SECURE_SSL_REDIRECT = os.environ.get('SECURE_SSL_REDIRECT') != "False"

X_FRAME_OPTIONS = 'SAMEORIGIN'

Expand Down Expand Up @@ -132,12 +134,12 @@
)

CMS_TEMPLATES = [
# Default template that extend base.html, to be used with Bootstrap 5
('bootstrap5.html', 'Bootstrap 5 Demo'),

# a minimal template to get started with
('minimal.html', 'Minimal template'),

# optional templates that extend base.html, to be used with Bootstrap 5
('bootstrap5.html', 'Bootstrap 5 Demo'),

('whitenoise-static-files-demo.html', 'Static File Demo'),
]

Expand Down Expand Up @@ -204,6 +206,7 @@

STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles_collected')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'


# AWS S3 storage configuration
Expand Down Expand Up @@ -258,7 +261,7 @@

SITE_ID = 1

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

CMS_CONFIRM_VERSION4 = True
DJANGOCMS_VERSIONING_ALLOW_DELETING_VERSIONS = True

0 comments on commit 1b29184

Please sign in to comment.