On Sat, Nov 19, 2011 at 10:53 PM, Gelonida N <gelon...@gmail.com> wrote:
> Just out of curiousity,
>
> Let's assume I add a middleware in settings.MIDDLEWARE_CLASSES and the
> middleware class is empty. (just a pass statement)
>
> Will it consume any CPU time while handling a request?
>
>
> To rephrase my question.
>  Is it at startup, that Django checks which methods a middleware
> implements . (this would be faster for most cases)
>
> or will Django check for every request whether a midlleware has a given
> method? (this would allow to add / remove methods in a middleware
> dynamically)
>

Questions like this can be quickly answered by perusing the source:

https://code.djangoproject.com/browser/django/trunk/django/core/handlers/base.py#L25

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to