{%extends "base.html"%} {%load plotly_dash%} {%block title%}Demo Eight - Django Session State{%endblock%} {%block content%}

Django Session State

This example demonstrates passing session state values from Django to a Dash app.

The view that renders this page updates a variable each time the view is rendered in this session. Clicking on the button will update the session with a record of the number of clicks of the button since the page was rendered.

The current page render count in this session is {{ind_use}}

{% load plotly_dash %}

<div class="{% plotly_class name="DjangoSessionState"%}">

{% plotly_app name="DjangoSessionState" ratio=0.3 %}

<\div>

{%plotly_app name="DjangoSessionState" ratio=0.3 %}
{%endblock%}