{% comment %} This demonstrates how to setup session security client side stuff on your own. It provides sensible defaults so you could start with just:: {% include 'session_security/all.html' %} {% endcomment %} {% load session_security_tags %} {% load i18n l10n %} {% load static %} {# If the user is not authenticated then there is no session to secure ! #} {% if request.user.is_authenticated %} {# The modal dialog stylesheet, it's pretty light so it should be easy to hack #} {# Include the template that actually contains the modal dialog #} {% include 'session_security/dialog.html' %} {# Load SessionSecurity javascript 'class', jquery should be loaded - by you - at this point #} {# Bootstrap a SessionSecurity instance as the sessionSecurity global variable #} {% with redirect_to_logout_flag=request|redirect_to_logout %} {% localize off %} {% endlocalize %} {% endwith %} {# Hidden POST form for logout — required by Django 5.x (LogoutView no longer accepts GET) #} {% with redirect_to_logout=request|redirect_to_logout %} {% if redirect_to_logout %}
{% endif %} {% endwith %} {% endif %}