diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index a3b0d48d6..57a49df0b 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -106,31 +106,31 @@ TEMPLATES = [ }, ] -LOG_LEVEL = env('LOG_LEVEL', 'INFO').upper() +LOG_LEVEL = env("LOG_LEVEL", "INFO").upper() # Override aspects of the default handler to our taste # See https://docs.djangoproject.com/en/3.2/topics/logging/#default-logging-configuration # for a reference to the defaults we're overriding LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'handlers': { + "version": 1, + "disable_existing_loggers": False, + "handlers": { # Overrides the default handler, which does not log in prod - 'console': { - 'level': LOG_LEVEL, - 'class': 'logging.StreamHandler', + "console": { + "level": LOG_LEVEL, + "class": "logging.StreamHandler", }, }, - 'loggers': { + "loggers": { # Override the log level for the default logger - 'django': { - 'handlers': ['console', 'mail_admins'], - 'level': LOG_LEVEL, + "django": { + "handlers": ["console", "mail_admins"], + "level": LOG_LEVEL, }, # Add a bookwyrm-specific logger - 'bookwyrm': { - 'handlers': ['console'], - 'level': LOG_LEVEL, - } + "bookwyrm": { + "handlers": ["console"], + "level": LOG_LEVEL, + }, }, } diff --git a/bookwyrm/views/inbox.py b/bookwyrm/views/inbox.py index 514cb685b..1d2c303b4 100644 --- a/bookwyrm/views/inbox.py +++ b/bookwyrm/views/inbox.py @@ -19,6 +19,7 @@ from bookwyrm.utils import regex logger = logging.getLogger(__name__) + @method_decorator(csrf_exempt, name="dispatch") # pylint: disable=no-self-use class Inbox(View):