Django - custom middleware variable

Hi, 

I am injecting my custom variable to the request object in middleware but PyCharm does not register that. What can I do so PyCharm starts registering the variable? I'm using the latest version of PyCharm Professional 

 

class RequestContextMiddleware(MiddlewareMixin):
def process_request(self, request):
request.user_context = UserContext.build(request)

 

0

Please sign in to leave a comment.