File: faq.rst

package info (click to toggle)
django-session-security 2.6.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 660 kB
  • sloc: javascript: 6,675; python: 594; makefile: 134; sh: 10
file content (20 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (4)
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/master/_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>
    ...