I'm trying to extract the values of a Select field, from a JSON file that houses the translations. The problem is caused by the get_locale() function, which can only be called within 'context.'
This is the form select-field:
brand = SelectField(choices=generate_brands(get_locale()),validators=[Optional()])
is there a way to load this specific field only when called inside of a view when the request variable is available?