Skip to content

Commit

Permalink
Remove unneeded middleware and change logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkcuys committed Sep 25, 2024
1 parent 4b8bc8b commit d8dc26a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lernanta/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'

MIDDLEWARE_CLASSES = (
'drumbeat.middleware.NotFoundMiddleware',
#'drumbeat.middleware.NotFoundMiddleware',
'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
'l10n.middleware.LocaleURLRewriter',
'django.middleware.common.CommonMiddleware',
Expand All @@ -139,7 +139,7 @@
'commonware.middleware.FrameOptionsHeader',
'django.middleware.locale.LocaleMiddleware',
'users.middleware.ProfileExistMiddleware',
'tracker.middleware.PageViewTrackerMiddleware',
#'tracker.middleware.PageViewTrackerMiddleware',
'users.middleware.UserActivityMiddleware',
)

Expand Down Expand Up @@ -237,6 +237,7 @@

ACCOUNT_ACTIVATION_DAYS = 7

#??
AUTHENTICATION_BACKENDS = (
'users.backends.DrupalUserBackend',
'users.backends.DrupalOpenIDBackend',
Expand Down Expand Up @@ -315,7 +316,11 @@
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
#'class': 'django.utils.log.AdminEmailHandler'
'class': 'logging.handlers.RotatingFileHandler',
'filename': path('error.log'),
'maxBytes': 1024 * 1024 * 5, # 5 MB
'backupCount': 5,
},
'file': {
'class': 'logging.handlers.RotatingFileHandler',
Expand Down

0 comments on commit d8dc26a

Please sign in to comment.