question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ButtonCol or Link col dynamic routes?

See original GitHub issue

Is it possible to set dynamic routes for a Button or LinkCol.

Current:

lass SupTable(Table):
    master_sup_id= Col('ID')
    supplier_name=Col('Supplier Name')
    supplier_state=Col('State')
    supplier_zip=Col('Zip')
    edit = ButtonCol('Edit','administrator.sup_master',url_kwargs=dict(master_sup_id='master_sup_id'))

lets say sup master is defined

@administrator.route('/supplier/<obj_id:int>')
def sup_master(obj_id):
....

except button col would be able to add the obj_id instead of passing an arg.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
guzzijonescommented, Apr 12, 2018

Oh I see you are using url_for. good work on this btw.

   def url(self, item):
        return url_for(self.endpoint, **self.url_kwargs(item))
0reactions
guzzijonescommented, Apr 19, 2018

It may be worth posting up in the examples a SSE of this and some CRUD MethodView child classes working together as a pull request. It seems I am writing a crud api and any help would be appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flask table and LinkCol, ButtonCol - passing value as URL ...
I use the following format: edit = LinkCol('Edit', 'app.foo', url_kwargs=dict(id='id')). Equivalent to url_for('app.foo', id=id).
Read more >
Flask Table
ButtonCol (subclass of LinkCol) creates a button that posts the the given address. NestedTableCol - allows nesting of tables inside columns. More about...
Read more >
Problems in changing dinamically theme with filled navigations bar ...
Hi, I've realized a panel that changes color dinamically. If I apply “filled” CSS and i change the color everything changes (buttons, checkboxes,...
Read more >
how to redirect to another page in react js on button click - You.com ...
Dynamic paths can include names and id's or whatever variable you would like. You first have to adjust your route and then change...
Read more >
Solved: Re: How to check for a variable from client contro...
<div class="landing-button col-md-3 hidden-xs hidden-sm"> <a href="{{data.url}}" title="Open LINK"> <img class="image" class="icon" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found