Django middleware

Please help me which all tasks can be achieved using django middleware

Cross site script validation
Connect to database for CRUD operation
User authentication
creating graphical images

I know user authentication can be done using middleware, but not sure of others :frowning:

All but the last are standard django features - you don’t need to code anything for them.

I guess it’s possible to create graphical images in middleware, but I can’t imagine any situation where I’d want to do that as middleware.

If you haven’t already done so, I really suggest you work your way through the standard Django tutorial. It will give you some experience with all the key features to help you gain an understanding of how all the parts of Django fit together.