Skip to content

Middleware

hypha.apply.projects.middleware

ProjectsEnabledMiddleware

ProjectsEnabledMiddleware(get_response)

Middleware to control access to project urls based on PROJECTS_ENABLED setting.

This makes the decision at runtime rather than at URL pattern registration time, avoiding potential issues with module loading order and settings configuration.

Source code in hypha/apply/projects/middleware.py
def __init__(self, get_response):
    self.get_response = get_response

get_response instance-attribute

get_response = get_response