Files
@ 24b61c257aab
Branch filter:
Location: kallithea/docs/usage/customization.rst
24b61c257aab
1.7 KiB
text/prs.fallenstein.rst
forms: wrap LoginForm inside function like other forms
All forms except LoginForm are wrapped inside a function. The original
purpose of this wrapping seems to be the ability to pass parameters to tweak
the form.
But, this also has another desired effect: translation of strings
wrapped with _ is no longer attempted when reading the class definition, but
only when the function is instantiated. In the former case, it is not
guaranteed that a translator is actually available because we are not
running in standard application context.
Align LoginForm with the others.
All forms except LoginForm are wrapped inside a function. The original
purpose of this wrapping seems to be the ability to pass parameters to tweak
the form.
But, this also has another desired effect: translation of strings
wrapped with _ is no longer attempted when reading the class definition, but
only when the function is instantiated. In the former case, it is not
guaranteed that a translator is actually available because we are not
running in standard application context.
Align LoginForm with the others.