def welcome(self):
        """Personalized welcome page"""
        if not g.user or not g.user.get_id():
            return redirect(appbuilder.get_url_for_login)

        welcome_dashboard_id = (
            db.session
            .query(UserAttribute.welcome_dashboard_id)
            .filter_by(user_id=g.user.get_id())
            .scalar()
        )
        if welcome_dashboard_id:
            return self.dashboard(str(welcome_dashboard_id))

        payload = {
            'user': bootstrap_user_data(),
            'common': self.common_bootsrap_payload(),
        }

        return self.render_template(
            'superset/basic.html',
            entry='welcome',
            title='Superset',
            bootstrap_data=json.dumps(payload, default=utils.json_iso_dttm_ser),
        )
def welcome ( self ) : if not g . user or not g . user . get_id ( ) : return redirect ( appbuilder . get_url_for_login ) welcome_dashboard_id = ( db . session . query ( UserAttribute . welcome_dashboard_id ) . filter_by ( user_id = g . user . get_id ( ) ) . scalar ( ) ) if welcome_dashboard_id : return self . dashboard ( str ( welcome_dashboard_id ) ) payload = { 'user' : bootstrap_user_data ( ) , 'common' : self . common_bootsrap_payload ( ) , } return self . render_template ( 'superset/basic.html' , entry = 'welcome' , title = 'Superset' , bootstrap_data = json . dumps ( payload , default = utils . json_iso_dttm_ser ) , )
Personalized welcome page