Hallöchen!
Considering the following old-style middleware class:
class ExceptionsMiddleware:
def process_exception(self, request, exception):
...
I convert this to new-style middleware by inserting two methods:
class ExceptionsMiddleware:
def __init__(self
Hi Torsten,
I worked on the design and implementation of new-style middleware.
On 11/22/2016 01:30 PM, Torsten Bronger wrote:
> Hallöchen!
>
> Considering the following old-style middleware class:
>
> class ExceptionsMiddleware:
> def process_exception(self,
Hallöchen!
Carl Meyer writes:
> [...]
>
> Yes, I agree with you that for middleware which don't implement
> request or response processing (only process_exception,
> process_view, or process_template_response), the new style is less
> concise, because it requires implementing a boilerplate __init
3 matches
Mail list logo