Live context ============ this mixin add a functionality to declare live context section, this section will render automatically live from the server .. code-block:: python from easy_rest.mixins import TemplateContextFetcherMixin from django.views import generic class ActiveTemplate(TemplateContextFetcherMixin, generic.TemplateView): template_name = 'app/live_ctx_demo.html' def get_context_data(self, **kwargs): return {"time": str(datetime.now()), "random_int": randint(0, 100)} .. code-block:: html {% load easy_rest %}
{% load_rest_scripts %} {% livecontext %}