문제

I have been using Django for a while. Recently, I came across Meteorjs and Emberjs. After looking at them I started wondering:

Could I combine Emberjs and Django to build reactive app like Meteorjs does?

How can Django project changes in its Models down to the browser?

도움이 되었습니까?

해결책

You could use Ember Data to represent your models in the browser which makes it easy to use a Restful interface to load and save your models.

If you want push changes from your Django server to the browser, you could use websockets or long polling to update the Ember Data models

다른 팁

Depending on your project needs, I think you can consider djangorestframework-reactive (https://pypi.org/project/djangorestframework-reactive/1.0.0/). The plugin will enable you to display immediate data changes without the need for long polling. There is also the option of using celery with Redis to achieve an immediate response. Check out sample here: https://codesachin.wordpress.com/2016/01/04/redis-celery-reactive-computing-in-django-for-iot-applications/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top