linuxrouter/docker/routlin-dash/app/pages/preferences/view.py
2026-06-02 00:47:03 -04:00

12 lines
394 B
Python

import json
from flask import session
import sanitize
def collect_tokens(cfg):
blank = [{'value': '', 'label': '-- Select timezone --'}]
return {
'PREF_EMAIL': session.get('email_address', ''),
'PREF_TIMEZONE': session.get('timezone', ''),
'TIMEZONE_OPTIONS': json.dumps(blank + [{'value': tz, 'label': tz} for tz in sanitize.VALID_TIMEZONES]),
}