-
In the documentation the following example is provided. from sqladmin import BaseView, expose
class ReportView(BaseView):
name = "Report Page"
icon = "fa-solid fa-chart-line"
@expose("/report", methods=["GET"])
async def report_page(self, request):
return await self.templates.TemplateResponse(request, "report.html")
admin.add_view(ReportView) I'd like to know if it's possible for these exposed endpoints to support query parameters. For example. I have a use case where I need a custom "report" view that has a dropdown of all our "reports". upon selection of a report, a table should populate with the values that correspond the select report. I'm trying to make use of AJAX requests to dynamically update the data by passing the report_id to the exposed endpoint and populating the table. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Shouldn't you pass request to "/admin/report" ? AFAIK the query parameter shouldn't interfere with the routing. |
Beta Was this translation helpful? Give feedback.
Shouldn't you pass request to "/admin/report" ? AFAIK the query parameter shouldn't interfere with the routing.