django_short_urls/middleware.py
def process_view(self, request, view_func, view_args, view_kwargs):  # pylint: disable=no-self-use
        """
        Called for every view, and catches database connection issues to serve the proper maintenance page.
        """
        try:
            return view_func(request, *view_args, **view_kwargs)
        except mongoengine.connection.ConnectionFailure as err:
            getLogger('app').error('Database access error: %s', err)

            return response_service_unavailable()

        Called for every view, and catches database connection issues to serve the proper maintenance page.
        
Called for every view, and catches database connection issues to serve the proper maintenance page.
Called for every view and catches database connection issues to serve the proper maintenance page .
def process_view(self, request, view_func, view_args, view_kwargs):  
        try:
            return view_func(request, *view_args, **view_kwargs)
        except mongoengine.connection.ConnectionFailure as err:
            getLogger('app').error('Database access error: %s', err)
            return response_service_unavailable()
def process_view ( self , request , view_func , view_args , view_kwargs ) : try : return view_func ( request , * view_args , ** view_kwargs ) except mongoengine . connection . ConnectionFailure as err : getLogger ( 'app' ) . error ( 'Database access error: %s' , err ) return response_service_unavailable ( )
Called for every view, and catches database connection issues to serve the proper maintenance page.
Called for every view and catches database connection issues to serve the proper maintenance page .
# pylint: disable=no-self-use """
        Called for every view, and catches database connection issues to serve the proper maintenance page.
        """
self
request
view_func
view_args
view_kwargs