You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indirectly get_locale from the language selector function will be called on before_handler. If you need information from another module inside that function and the module in question is called afterwards, you don't have that (e.g. the user from userbase).
Thus this function should be called lazy and not on handler instantiation. it should be called once it's first used (and only once apparently but the code might make sure of that already by storing the result in the handler).
Best would probably be in self._() although this is already bound to gettext IIRC. But there should be some solution to that or alternatively a user should make sure that babel is always the last module.
The text was updated successfully, but these errors were encountered:
Indirectly get_locale from the language selector function will be called on before_handler. If you need information from another module inside that function and the module in question is called afterwards, you don't have that (e.g. the user from userbase).
Thus this function should be called lazy and not on handler instantiation. it should be called once it's first used (and only once apparently but the code might make sure of that already by storing the result in the handler).
Best would probably be in self._() although this is already bound to gettext IIRC. But there should be some solution to that or alternatively a user should make sure that babel is always the last module.
The text was updated successfully, but these errors were encountered: