Skip to content
Snippets Groups Projects
Commit cab644a8 authored by James Smith's avatar James Smith
Browse files

user auto timeout

parent 199903f5
No related branches found
No related tags found
No related merge requests found
......@@ -167,5 +167,14 @@
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.3.0/flowbite.min.js"></script>
{% if request.user.is_authenticated %}
<script type="text/javascript">
setTimeout(function(){
window.location.href = "{% url 'login' %}";
}, {{ request.session.get_expiry_age }}000); // Convert seconds to milliseconds
</script>
{% endif %}
</body>
</html>
......@@ -177,6 +177,7 @@ LOGOUT_REDIRECT_URL = '/'
SESSION_COOKIE_AGE = 300
SESSION_SAVE_EVERY_REQUEST = True
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
#PayPal API settings
PAYPAL_MODE = 'sandbox'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment