12 lines
394 B
Python
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]),
|
|
}
|