yourlabs / django-session-security

A little javascript and middleware work together to ensure that the user was active during the past X minutes in any tab he has open. Otherwise, display a warning leaving a couple of minutes to show any kind of activity like moving the mouse. Otherwise, logout the user.
http://django-session-security.rtfd.org
MIT License
309 stars 142 forks source link

Can I override the templates? #128

Closed sillycube closed 5 years ago

sillycube commented 5 years ago

I found that the templates are located in /usr/local/lib/python3.7/site-packages. Can I override them with my custom templates instead of directly changing the templates under the folder?

sillycube commented 5 years ago

Sorry, I made a stupid question. Just replace the {% include 'session_security/all.html' %} in base template with my own template and there is no problem

mpasternak commented 5 years ago

There are no silly questions. Do you know how to {% extends %} a template?

sillycube commented 5 years ago

Yes, I know! Just looked at my code and it's basically similar to {% include %}!

jpic commented 5 years ago

You would need to change the template name in the include tag anyway, unless you have that plugin that allows to extend a template of the same name given an app name