-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
global: merge admin #40
Conversation
* Adds Flask-Admin model views registration. Signed-off-by: Krzysztof Nowak <k.nowak@cern.ch>
@@ -39,6 +39,7 @@ | |||
|
|||
from .errors import PIDAlreadyExists, PIDDoesNotExistError, PIDInvalidAction, \ | |||
PIDObjectAlreadyAssigned | |||
from flask_babelex import gettext as _ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gettext or lazy_gettext?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be lazy_gettext
, but Flask-Admin is not happy about lazy strings so need to figure out a solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about _ = lambda x: x
and using gettext in templates?
@classmethod | ||
def as_title(cls, value): | ||
"""Get title for status.""" | ||
return dict(cls.titles)[value] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no cover?
Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
Ready |
No description provided.