Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Middleware and Request Context in some views

I am creating a chat like facebook chat... so in views.py of my Chat Application, I need to retrieve only the last messages every 3-4 seconds with ajax poll ( the latency is not a problem for me ).

If I can disable some Middlewares and some Request Context in this view, the response will be faster... no ?

My question is:

Is there a way to disable some Middlewares and some Request Context in some views ?

like image 259
xRobot Avatar asked Jun 05 '10 06:06

xRobot


1 Answers

This is not likely to be feasible. Best to have a second Django project or WSGI app to handle these requests.

like image 164
Ignacio Vazquez-Abrams Avatar answered Nov 11 '22 00:11

Ignacio Vazquez-Abrams