We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a question on how to implement a computed field.
For example, I'd like to add such a field to column_list, smth like that:
class UserProfile(db.Model): id = db.Column(db.Integer, primary_key=True) name = db.Column(db.Unicode(128)) admin = db.Column(db.Boolean, index=True) def get_name_ex(self): return '%s (admin: %s)' % (self.name, self.admin) ... class UserProfileAdmin(ModelView, AuthBaseView): column_list = ['get_name_ex']
But this does not work as expected. Please advise.
The text was updated successfully, but these errors were encountered:
Make it a property, either generic python one or a SQLAlchemy hybrid property.
Sorry, something went wrong.
Hm.. Tried to make a propery. Will try again. Also found probably a solution with column_formatters - http://www.paulsprogrammingnotes.com/2014/03/checkmark-columnformatters-flask-admin.html Thanks.
No need for a property in my case - just format a column like here http://stackoverflow.com/questions/17174707/can-model-views-in-flask-admin-hyperlink-to-other-model-views Thanks. Please close it.
No branches or pull requests
I have a question on how to implement a computed field.
For example, I'd like to add such a field to column_list, smth like that:
But this does not work as expected.
Please advise.
The text was updated successfully, but these errors were encountered: