Not able to setup custom page inside superset #38770
Replies: 1 comment
-
|
The issue is that you're calling The correct approach is to use from flask_appbuilder import BaseView, expose
class MyCustomView(BaseView):
route_base = "/custom"
@expose("/")
def index(self):
return "Custom Page Working ✅"
def mutate_app(app):
from superset.extensions import appbuilder
appbuilder.add_view_no_menu(MyCustomView())
return app
FLASK_APP_MUTATOR = mutate_appThis registers your view during app initialization when Note: Only one To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug description
Not able to setup custom page inside superset
when adding
from flask_appbuilder import BaseView, expose
from superset.extensions import appbuilder
class MyCustomView(BaseView):
route_base = "/custom"
appbuilder.add_view_no_menu(MyCustomView())
/home/ubuntu/
├── superset_env/ # virtualenv
│ └── lib/python3.10/site-packages/superset/
│
├── custom_app/
│ ├── init.py
│ └── custom_view.py
│
└── superset_config.py
superset startup fails
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
Beta Was this translation helpful? Give feedback.
All reactions