Commit 1da131cd authored by Your Name's avatar Your Name

Fix template session references for Python 3.13 compatibility

- Updated base.html to use request.session instead of session
- Resolves jinja2.exceptions.UndefinedError: 'session' is undefined
- Completes Python 3.13 compatibility fix
parent 9ee547d7
...@@ -92,7 +92,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -92,7 +92,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<div class="header"> <div class="header">
<div class="container"> <div class="container">
<h1>AISBF Dashboard</h1> <h1>AISBF Dashboard</h1>
{% if session.logged_in %} {% if request.session.logged_in %}
<div class="header-actions"> <div class="header-actions">
<button onclick="restartServer()" class="btn btn-warning">Restart Server</button> <button onclick="restartServer()" class="btn btn-warning">Restart Server</button>
<a href="{{ url_for(request, '/dashboard/logout') }}" class="btn btn-secondary">Logout</a> <a href="{{ url_for(request, '/dashboard/logout') }}" class="btn btn-secondary">Logout</a>
...@@ -101,7 +101,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. ...@@ -101,7 +101,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
</div> </div>
</div> </div>
{% if session.logged_in %} {% if request.session.logged_in %}
<div class="container"> <div class="container">
<div class="nav"> <div class="nav">
<a href="{{ url_for(request, '/dashboard') }}" {% if request.path == '/dashboard' %}class="active"{% endif %}>Overview</a> <a href="{{ url_for(request, '/dashboard') }}" {% if request.path == '/dashboard' %}class="active"{% endif %}>Overview</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment