You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that suburn not passed to template ajax, but all another routing work correctly - it confused me.
(I think that we need additional param like sub_url separatly off base_url to specific behavior.)
The text was updated successfully, but these errors were encountered:
Meanwhile, I did a quick workaround in my project:
admin=Admin(
app,
engine,
authentication_backend=auth_backend,
base_url='/admin-ui',
)
admin.add_view(view)
ifview.is_modelandapp.root_path:
# This URL goes directly into template into Select2 widget# With current code (sqladmin 0.16.1) it goes as is# The URL will be: /admin-ui/my-model/ajax/lookup# But the correct one for production is prefixed# /proxy-prefix/admin-ui/my-model/ajax/lookupview.ajax_lookup_url=app.root_path+view.ajax_lookup_url
Checklist
master
.Describe the bug
Ajax request from browser doesn't consider urn which setted up by sub fastapi app.
Steps to reproduce the bug
Expected behavior
Ajax should request to uri as:
.../suburn/ModelViewName/ajax/...
Actual behavior
Ajax request to uri:
.../ModelViewName/ajax/...
with skippingsuburn
.P.S. Admin page routing is correct with sub app.
Debugging material
In my way:
suburn='/admin'
base_url='/'
Environment
OS:
MacOS 14.4.1
Python:
3.11.8
sqladmin==0.16.1
fastapi==0.110.1
Additional context
I understand that suburn not passed to template ajax, but all another routing work correctly - it confused me.
(I think that we need additional param like
sub_url
separatly offbase_url
to specific behavior.)The text was updated successfully, but these errors were encountered: