Comments (8)
Hey,
not sure if I get your question right.
I can think of two points:
- Use can use
Admin(base_url=...)
to configure the URL. - In your app you don't se the root_path in path, instead that's the prefix in your routers.
Generally I think this makes sense since you want to handle multiple API versionings in your app, running at the same time so setting the version on the whole app might not be a good idea.
from sqladmin.
Default base_url suits me, however, whenever set any root_path, admin gets messy like I showed in screenshots. You second point would work, but, it is hassle to add api/v1/
to every app's router. I think admin should be independent of root_path and have its url.
from sqladmin.
Anyway if you want to do that you can just modify admin.app which is just another FastAPI app so you can do any config you want.
from sqladmin.
How? Just adding root_path breaks admin panel. Is it expected?
from sqladmin.
I haven't tested this before, doesn't setting this work?
admin.app["root_path"] = ...
from sqladmin.
Just checked, no it does not work. Change the line to:
admin.app.root_path = ""
, but as app
passed to admin is the global fastapi app, I am overriding global root_path => All endpoints are without /api/v1/
from sqladmin.
@mmzeynalli have you solved this problem?
from sqladmin.
To be honest no, unfortunately, have been super busy for the last couple of months.
from sqladmin.
Related Issues (20)
- Admin panel logging
- Use relative URLs instead of absolute URLs HOT 3
- Support the Aiohttp framework HOT 2
- After deleting objects, page size is not maintained
- Hashing strategy for the fields such as password in the creation of a new row HOT 2
- Custom confirmation HTML HOT 1
- Static file over https in AWS with ECS and LoadBalancer HOT 16
- CSS and Javascript files for the Admin not loaded HOT 2
- Overriden form text field with FileUpload field. HOT 7
- Not able to edit fields in sql admin when using s3 filetype HOT 3
- Unexpected main page view HOT 6
- Add ModelView.form_query property to create form-filtering feature HOT 2
- override delete model method to perform soft delete HOT 1
- form_overrides doesn't work HOT 2
- SqlAlchemy dataclass support missing HOT 6
- Multiple Admin Instances result in wrong URL's to the views HOT 1
- Ajax query passes incorrect urn when admin mounted on sub fastapi app HOT 3
- Sort symbol is incorrect (wrong direction)
- sqladmin + jinja templates conflict index.html HOT 3
- Raised value error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqladmin.