Skip to content
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

add column_extra_row_actions in fileadmin view #46

Open
sebastianhenaosanta opened this issue Feb 23, 2022 · 0 comments
Open

add column_extra_row_actions in fileadmin view #46

sebastianhenaosanta opened this issue Feb 23, 2022 · 0 comments

Comments

@sebastianhenaosanta
Copy link

sebastianhenaosanta commented Feb 23, 2022

This is not an issue this is more like a question, i'm working with file admin and i want to add an column_extra_row_actions, i have tried that using the following code:

class MyView(FileAdmin):
can_upload = False
can_delete = True
can_mkdir = False
column_extra_row_actions = [
EndpointLinkRowAction('glyphicon glyphicon-play','')
]

file_admin_view = MyView('/home/pi/Desktop/projects/', url = '/' , name='Projects')

admin = Admin(app,
name='projects',
index_view = file_admin_view,
template_mode='bootstrap3')

but i haven't had success.
do you know what am i doing wrong?
what's is the correct way to do this?, i have fallowed the documentation and i have found this:

from flask_admin.model.template import EndpointLinkRowAction, LinkRowAction
class MyModelView(BaseModelView):
column_extra_row_actions = [
LinkRowAction('glyphicon glyphicon-off', 'http://direct.link/?id={row_
˓→id}'),
EndpointLinkRowAction('glyphicon glyphicon-test', 'my_view.index_view
˓→')
]

but i don't know if this methodology also works with fileadmin view. What i understand is that BaseModelView is for database model view modification, but i'm not sure if it also works with fileadmin view.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant