Skip to content

Commit

Permalink
Merge pull request #2663 from FroggyFlox/2662-Update-Middlewares-styles
Browse files Browse the repository at this point in the history
Migrate to New Middleware style #2662
  • Loading branch information
phillxnet authored Aug 22, 2023
2 parents 3f87942 + e17feca commit c0f7db9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/rockstor/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2012 RockStor, Inc. <https://rockstor.com>
Copyright (c) 2023 RockStor, Inc. <https://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -145,7 +145,7 @@
},
]

MIDDLEWARE_CLASSES = (
MIDDLEWARE = (
# New in 1.8, 1.11 newly sets Content-Length header.
# 'django.middleware.common.CommonMiddleware',
"django.contrib.sessions.middleware.SessionMiddleware",
Expand Down
7 changes: 4 additions & 3 deletions src/rockstor/storageadmin/middleware.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
Copyright (c) 2012-2023 RockStor, Inc. <https://rockstor.com>
This file is part of RockStor.
RockStor is free software; you can redistribute it and/or modify
Expand All @@ -13,18 +13,19 @@
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""

from system.osi import run_command
from django.conf import settings
from django.utils.deprecation import MiddlewareMixin

import logging

logger = logging.getLogger(__name__)


class ProdExceptionMiddleware(object):
class ProdExceptionMiddleware(MiddlewareMixin):
def process_exception(self, request, exception):
"""just log the exception"""
e_msg = (
Expand Down

0 comments on commit c0f7db9

Please sign in to comment.