Compare commits

..

No commits in common. "c9235c6961517991b35ce87ddad7fb3510d19ec6" and "e79a5075db4cb970c030095aceaa4fa33de4a197" have entirely different histories.

4 changed files with 2 additions and 27 deletions

View File

@ -1,10 +1,6 @@
libgobject-2.0-0 libgobject-2.0-0
libpango-1.0-0 libpango-1.0-0
libpangocairo-1.0-0
libcairo2 libcairo2
libharfbuzz0b libharfbuzz0b
libfontconfig1 libfontconfig1
libpangoft2-1.0-0 libpangoft2-1.0-0
libgdk-pixbuf2.0-0
libffi-dev
shared-mime-info

View File

@ -1,2 +1 @@
release: python manage.py migrate web: gunicorn config.wsgi --log-file -
web: gunicorn config.wsgi --log-file -

View File

@ -1,6 +1,5 @@
import os import os
import sys import sys
import dj_database_url
from pathlib import Path from pathlib import Path
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -14,7 +13,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'django-insecure-change-me-locally') SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'django-insecure-change-me-locally')
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get('DEVELOPMENT', 'False') == 'True' DEBUG = os.environ.get('DEBUG', 'True') == 'True'
ALLOWED_HOSTS = ['*'] ALLOWED_HOSTS = ['*']
@ -22,7 +21,6 @@ CSRF_TRUSTED_ORIGINS = [
'https://*.flatlogic.app', 'https://*.flatlogic.app',
'https://*.flatlogic.run', 'https://*.flatlogic.run',
'https://*.flatlogic.com', 'https://*.flatlogic.com',
'https://*.herokuapp.com',
'http://localhost:8000', 'http://localhost:8000',
'http://127.0.0.1:8000', 'http://127.0.0.1:8000',
] ]
@ -43,7 +41,6 @@ INSTALLED_APPS = [
MIDDLEWARE = [ MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware', 'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware', 'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
@ -90,11 +87,6 @@ DATABASES = {
} }
} }
# Use DATABASE_URL if it is set (standard for Heroku)
db_from_env = dj_database_url.config(conn_max_age=600)
if db_from_env:
DATABASES['default'].update(db_from_env)
# Password validation # Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators # https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators
@ -147,16 +139,6 @@ STATICFILES_DIRS = [
BASE_DIR / "assets", BASE_DIR / "assets",
] ]
# Whitenoise storage for compressed and cached static files
STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.FileSystemStorage",
},
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}
# Conditionally add node_modules if it exists (prevents W004 warning) # Conditionally add node_modules if it exists (prevents W004 warning)
if (BASE_DIR / 'node_modules').exists(): if (BASE_DIR / 'node_modules').exists():
STATICFILES_DIRS.append(BASE_DIR / 'node_modules') STATICFILES_DIRS.append(BASE_DIR / 'node_modules')

View File

@ -5,5 +5,3 @@ gunicorn==21.2.0
requests requests
openpyxl openpyxl
WeasyPrint WeasyPrint
dj-database-url
whitenoise