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

   <!-- Answer -->
   Superset 5.x removed support for customizing the main IndexView via 
FAB_INDEX_VIEW in superset_config.py—a breaking change from 4.x. That config is 
now ignored, so even if your class is defined, Superset won’t use it, which 
leads to the AttributeError you’re seeing. The supported way to customize 
IndexView is to use FLASK_APP_MUTATOR: define your custom IndexView class, then 
set appbuilder.indexview to it inside a mutate_app function, and assign that 
function to FLASK_APP_MUTATOR in your config. Example:
   
   ```python
   from flask_appbuilder import expose, IndexView
   from superset.typing import FlaskResponse
   
   class MyCustomIndexView(IndexView):
       @expose('/')
       def index(self) -> FlaskResponse:
           # your custom logic here
           pass
   
   def mutate_app(app):
       from superset.extensions import appbuilder
       appbuilder.indexview = MyCustomIndexView
   
   FLASK_APP_MUTATOR = mutate_app
   ```
   
   Remove any FAB_INDEX_VIEW config. If you’re running in Docker Compose, place 
your config at `/app/docker/pythonpath_dev/superset_config_docker.py` and 
restart your containers so it’s picked up. If you still see errors, check your 
logs for import or syntax errors in your config file—any such error will 
prevent your class from being available. More details and examples are in these 
threads: [issue #34441](https://github.com/apache/superset/issues/34441), 
[discussion #34530](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/af5fc977-1b2a-4d93-baeb-2872d205fed7?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/af5fc977-1b2a-4d93-baeb-2872d205fed7?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/af5fc977-1b2a-4d93-baeb-2872d205fed7?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/af5fc977-1b2a-4d93-baeb-2872d205fed7?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/af5fc977-1b2a-4d93-baeb-2872d205fed7?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/af5fc977-1b2a-4d93-baeb-2872d205fed7?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/af5fc977-1b2a-4d93-baeb-2872d205fed7?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/34422)


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to