# Path: twobuntu/routers.py
# class ReadOnlyError(Exception):
#     """
#     Error raised when writing during read-only mode.
#     """


from django.shortcuts import render
from twobuntu.routers import ReadOnlyError



class ReadOnlyMiddleware(object):
    """
    Catch ReadOnlyError exceptions and display the appropriate error page.
    """

    def process_exception(self, request, exception):

# Path: twobuntu/routers.py
# class ReadOnlyError(Exception):
#     """
#     Error raised when writing during read-only mode.
#     """


# Path: twobuntu/middleware.py
from django.shortcuts import render
from twobuntu.routers import ReadOnlyError




class ReadOnlyMiddleware(object):
    """
    Catch ReadOnlyError exceptions and display the appropriate error page.
    """

    def process_exception(self, request, exception):

        if isinstance(exception, ReadOnlyError):