rusackas commented on issue #34422: URL: https://github.com/apache/superset/issues/34422#issuecomment-4748928556
Circling back on this one... I think the thread went a little sideways. `FAB_INDEX_VIEW` actually does still work in 5.x - FAB resolves it during `init_app` and it overrides our default `SupersetIndexView`, so you shouldn't need the `FLASK_APP_MUTATOR` gymnastics (and setting `appbuilder.indexview` from a mutator won't stick anyway, since that runs after the routes are already registered). The `AttributeError` is really an import-path thing: `FAB_INDEX_VIEW` gets imported as a real dotted path, but we only copy *uppercase* names out of `superset_config.py`, so `"superset_config.MyCustomclass"` only resolves if `superset_config` is itself importable by that name on the `PYTHONPATH`... which it often isn't when you load config via `SUPERSET_CONFIG_PATH`. Easiest fix is to drop the view into its own importable module and point `FAB_INDEX_VIEW` at that. One more gotcha: subclass `SupersetIndexView` (not bare `IndexView`) so you keep the `/lang/<locale>` handling. Wrote it all up in #41222 so the next person doesn't hit the same wall. Closing as a config/usage thing, but happy to reopen if you've got a real code-level repro. Thanks for your patience here! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
