Reputation: 228
I have a page that displays last 10 requests to server. Requests are models that are saved by the middleware. I need to update page with new requests, without refreshing.
I know I can use ajax, and ping server periodically, but sure should be better approach.
Upvotes: 0
Views: 1044
Reputation: 43300
You're probably looking for django channels which is scheduled to be included in django 1.10 (summer 2016)
It works via websockets instead of ajax polling
Upvotes: 2
Reputation: 949
Async page refresh can be done only in front-end with javascript
. Django will only render the template or return the HTTP response
P.S: You can do page refresh via backend code(Django) or any
Upvotes: 1