On Tue, Jul 7, 2009 at 11:32 AM, Philip Zeyliger<[email protected]> wrote:
> Hi,
>
> I have a project made up of several applications, and one of those
> applications needs some specific middleware, whereas the others don't.  Is
> there a way to enable middleware per-application?

you can use a middleware as a decorator to a view function (and vice versa):


from django.utils.decorators import decorator_from_middleware
newview = decorator_from_middleware(middleware_class)(yourapp.someview)




-- 
Javier

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

Reply via email to