File: faq.rst

package info (click to toggle)
django-session-security 2.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 624 kB
  • ctags: 283
  • sloc: python: 515; makefile: 130
file content (20 lines) | stat: -rw-r--r-- 751 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
How to trigger activity programaticaly in JS ?
----------------------------------------------

Call `sessionSecurity.activity()
<http://django-session-security.readthedocs.org/en/stable-2.x.x/_static/script.html#section-11>`
every time you want to programaticaly trigger an activity.


How to disable the "Are you sure you want to leave this page?" warning ?
------------------------------------------------------------------------

Include the JavaScript variable ``sessionSecurity.confirmFormDiscard = undefined;`` somewhere in your project *after* the plugin's JS. For example::

    <!-- base.html -->
    ...
    {% include 'session_security/all.html' %}
    <script>
        sessionSecurity.confirmFormDiscard = undefined;
    </script>
    ...