I am aware of the following methods for adding middlewares 1) Adding custom middleware component to django using MIDDLEWARE_CLASSES
MIDDLEWARE_CLASSES = (
'......'
'path.to.custom.middlware',)
2) Adding view specific middleware using decorate_from_middlware
cache_page = decorator_from_middleware(CacheMiddleware)
@cache_page(3600)
def my_view(request):
pass
My request is how to create application specific middleware class like
APPSPECIFIC_MIDDLEWARE_CLASSES = ( 'path.to.middlwareclass1',
'path.to.middlwareclass2',
'path.to.middlwareclass3', )
middlwareclass is either function or class ? Is there any to do this using url or any other method,. Or 2nd method is the only way and to add all middleware classes separately to the view ?
Update : http://python-social-auth.readthedocs.org/en/latest/pipeline.html As in the about application, the SOCIAL_AUTH_PIPELINE is working for the social app alone. which differs from the global project settings..
Thanks in Advance