-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
The action URLs routes currently cannot contain variable types or they will not work with the render_table
macro
#136
Comments
Some additional info. When passing |
Hey @greyli it's because the placeholder must be a string because inside the
then you pass While rendering the rows, the macro will then replace Initially, I had thought of putting the In summary, the reason we can't add types to path parameters is that |
We can have the |
@michaelbukachi What about using a Custom Converter? That seems like a more practical approach that aligns with the idea of keeping the macros as hands-off and convenient as possible (not having to pass even more parameters). I think this way we could manage a custom converter and only have to worry about registering it once, when the extension is initialized. Thoughts? |
Hmmm. Do you mean using something like |
Maybe possibly using a custom one to avoid overriding the built-ins, like |
We would also have to factor strings. Strings are used frequently these days as primary keys especially when as uuids. |
@michaelbukachi Correct, sorry that I wasn't clear. I was implying we create a custom one for ints and another for strings. So, something like |
That works. @greyli what do you think? |
Sounds good to me. We can discuss this further in the PR. |
After further consideration, I feel like it'd be ideal to keep the original The first thing that would need to happen is a re-working of the way we construct the urls with placeholders. Possible solution:
Benefits of this approach:
Downside of this approach:
Thoughts? |
The action url routes currently cannot contain variable types or they will not work with the macro. Example:
@app.route("/a/<int:b>/c")
Originally posted by @caffeinatedMike in #135 (comment)
The text was updated successfully, but these errors were encountered: