linkding/siteroot/settings/dev.py

61 lines
1.3 KiB
Python
Raw Normal View History

2019-07-04 23:26:52 +00:00
"""
Development settings for linkding webapp
"""
# Start from development settings
# noinspection PyUnresolvedReferences
from .base import *
# Turn on debug mode
DEBUG = True
# Turn on SASS compilation
SASS_PROCESSOR_ENABLED = True
2021-03-28 10:11:56 +00:00
# Enable debug toolbar
INSTALLED_APPS.append('debug_toolbar')
MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
INTERNAL_IPS = [
'127.0.0.1',
]
# Allow access through ngrok
CSRF_TRUSTED_ORIGINS = ['https://*.ngrok-free.app']
2019-07-04 23:26:52 +00:00
# Enable debug logging
LOGGING = {
'version': 1,
2021-01-12 21:42:56 +00:00
'disable_existing_loggers': False,
'formatters': {
'simple': {
2023-01-14 10:24:09 +00:00
'format': '{levelname} {asctime} {module}: {message}',
2021-01-12 21:42:56 +00:00
'style': '{',
},
2019-07-04 23:26:52 +00:00
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
2021-01-12 21:42:56 +00:00
'formatter': 'simple'
2019-07-04 23:26:52 +00:00
}
},
2021-01-12 21:42:56 +00:00
'root': {
'handlers': ['console'],
'level': 'WARNING',
},
2019-07-04 23:26:52 +00:00
'loggers': {
'django.db.backends': {
'level': 'ERROR', # Set to DEBUG to log all SQL calls
2019-07-04 23:26:52 +00:00
'handlers': ['console'],
},
'bookmarks': { # Log importer debug output
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
2019-07-04 23:26:52 +00:00
}
}
}
# Import custom settings
# noinspection PyUnresolvedReferences
from .custom import *