How Python Django Works - জ্যাঙ্গো কিভাবে কাজ করে?
Did you know that Instagram is made using Django despite the huge traffic that happens in this system.
Yes django isn't the best thing from the performance side and this is clear from the picture that there is a very big trip the request takes but watch out speed is just one of thousands of factors for example security and scalability and these are two things that django is characterized by in a terrible way and for Ok, let us understand the rest of the Django working:
First the request goes to the server and makes it a process using Nginx server which is the first stop for the request and then it goes to the WSGI process which converts the http request to the form of Python you understand it and then you receive it the middleware and this is a very normal function that rings before the request reaches its face
For example: she makes sure that the user is authenticated or that the IP of the user is allowed or not and so on After that, we go to the URL router and this function you see the url in its shape and on the basis of which you send it to the appropriate view, and who does not know what the view means is your main function in which you receive the request and then make your logic and return the response to the user.