dosubot[bot] commented on issue #34575:
URL: https://github.com/apache/superset/issues/34575#issuecomment-3159813587

   <!-- Answer -->
   This is a breaking change in Superset 5.0.0: customizing the main IndexView 
using `FAB_INDEX_VIEW` in `superset_config.py` is no longer supported. Superset 
now ignores this setting, which is why you see the "attribute not found" 
error—even if your class is defined correctly. The new, supported way is to use 
`FLASK_APP_MUTATOR` to programmatically set `appbuilder.indexview` before views 
are registered.
   
   To migrate, define your custom IndexView class as before, then add a 
`mutate_app` function and assign it to `FLASK_APP_MUTATOR`:
   
   ```python
   from flask_appbuilder import expose, IndexView
   from superset.typing import FlaskResponse
   
   class SupersetDashboardIndexView(IndexView):
       @expose("/")
       def index(self) -> FlaskResponse:
           session.pop('_flashes', None)
           return redirect("/dashboard/list/")
   
   def mutate_app(app):
       from superset.extensions import appbuilder
       appbuilder.indexview = SupersetDashboardIndexView
   
   FLASK_APP_MUTATOR = mutate_app
   ```
   
   Remove any `FAB_INDEX_VIEW` setting from your config. Make sure your config 
file is loaded (check logs for "Loaded your LOCAL configuration at [...]") and 
that your `mutate_app` function runs at startup. If you're using Docker, ensure 
your config file is in the correct location (e.g., 
`./docker/pythonpath_dev/superset_config_docker.py`) and restart your 
containers. More details and troubleshooting tips are available in [this 
discussion](https://github.com/apache/superset/issues/34441) and [this 
thread](https://github.com/apache/superset/discussions/34530).
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/8e8ea0fd-3304-47c8-a49b-d044afda531e?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/8e8ea0fd-3304-47c8-a49b-d044afda531e?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/8e8ea0fd-3304-47c8-a49b-d044afda531e?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/8e8ea0fd-3304-47c8-a49b-d044afda531e?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/8e8ea0fd-3304-47c8-a49b-d044afda531e?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/8e8ea0fd-3304-47c8-a49b-d044afda531e?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/8e8ea0fd-3304-47c8-a49b-d044afda531e?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34575)


-- 
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]

Reply via email to