Domino and Dash

Follow

Comments

5 comments

  • Jaclyn Patterson

    Hello!

    Thanks for your question.

    If you are having trouble getting your CSS to work you may need to set an external path to it. Here is the code to do that if it's stored in an assets folder:

    import os
    
    runID = os.environ['DOMINO_RUN_ID']
    user = os.environ['DOMINO_PROJECT_OWNER']
    project = os.environ['DOMINO_PROJECT_NAME']
    
    assets_path = '<Domino url>'+ user + '/' + project +'/r/notebookSession/' + runID + '/assets/'
    
    #set the external path to the assets folder
    app = dash.Dash(assets_external_path = assets_path)
    

    Here is more information on using Dash Apps in Domino: https://community.dominodatalab.com/discussion/comment/140 and https://docs.dominodatalab.com/en/3.6/reference/publish/apps/Getting_started_with_Dash.html

    Submitted by: akshay.ambekar

    0
    Comment actions Permalink
  • Jaclyn Patterson

    Some additional info.

    On dash app i define:

    app = dash.Dash(__name__)

    and create assets directory where I put my css file.

    I recreate this structure on my domino projects but do not work. Some advice?

    Thanks again.

    Submitted by: puggelli_vladimiro

    0
    Comment actions Permalink
  • Jaclyn Patterson

    Thank you very much for your support. It work very well!

    Submitted by: puggelli_vladimiro

    0
    Comment actions Permalink
  • Jaclyn Patterson

    Hi,

    I am running into the same problem and the solution above did not work for me. I am working on Domino 3.5.7. Do you have any other suggestions?


    I currently have my python script in my project folder and then I have an assets folder in my project folder as well. My CSS file is in my asset folder.

    Submitted by: freihofer_isabel_brown

    0
    Comment actions Permalink
  • Jaclyn Patterson

    Hi Isabel,

    Sorry the above solution is not working for you. I'm not sure what version of Dash you are using or what particular specifications in your project that might be helpful context for sorting this out. I would suggest you submit a Support ticket so that someone can be assigned to your issue and work to troubleshoot it directly with you. Just send an email to support@dominodatalab.com with the details and we would be happy to help. :)

    Submitted by: tayler.sale

    0
    Comment actions Permalink

Please sign in to leave a comment.