The specific URL part has been answered. I'm presuming that you want something automatic for a third party app that you don't want to modify.
In process_view you have access to the view function. You should be able to introspect that to figure out whether it is supplied by the target app or not. This is too late to control anything in process_request, but, since you can decorate the request in process_view if you find that it is from your target app, all the other proces_xxx methods can benefit from your determination. Bill On Fri, May 10, 2013 at 6:40 AM, Hristo Deshev <hri...@deshev.com> wrote: > > > Does anyone know if is possible execute a middleware only to a > specific application or url? > > On 05/09/2013 04:56 PM, Shawn Milochik wrote: > > In your middleware you'll have access to the request object, so you can > > easily check the URL, user, etc. > > I'd consider a solution based on view decorators too: > > https://docs.djangoproject.com/en/dev/topics/http/decorators/ > > Hristo > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.