# Dash Project Structure - modules outside the main project folder

**URL:** <https://community.plotly.com/t/dash-project-structure-modules-outside-the-main-project-folder/58361>\
**Category:** Dash Python\
**Created:** [November 12, 2021, 10:49am UTC](https://community.plotly.com/t/dash-project-structure-modules-outside-the-main-project-folder/58361 "2021-11-12T10:49:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamemuh](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hamemuh](https://community.plotly.com/u/hamemuh)\
**Post date:** [November 12, 2021, 10:49am UTC](https://community.plotly.com/t/dash-project-structure-modules-outside-the-main-project-folder/58361/1 "2021-11-12T10:49:35Z")

</div>

Hi,

My dash app runs well locally, but having issues deploying it to Dash Enterprise.

I’ve followed the recommended project structure in docs, except I have some modules outside of the dash project folder which my visualisations depend on;

> src/  
> dash\_project/
> 
> - visualisations.py
> - app.py
> - requirements.txt
> - Procfile
> 
> models/
> 
> - my\_model.py

In visualisations.py, I import my model code using an absolute path;

visualisations.py

from src.models.my\_model import modelFramework

The problem is the path from src isn’t recognized when deploying the dash\_project folder to dash enterprise.  
Things I’ve tried:

- Include the model folder within dash\_project. This works, but is not a logical way to organise my repo.
- Instead of only copying the contents of dash\_project, copy the entire src folder into dash server. This fails because the project root (/src) doesn’t contain the Procfile.
- Move Procfile, app.py and requirements.txt to src folder and copy entire src folder into dash server. This doesn’t throw any errors in the deployment pipeline, but my app isn’t updated with the latest changes (even though git diff picks up the correct changes before pushing)

Is there a way to successfully deploy the app with my initial intended layout?

---

<div class="post-metadata">

**Author:** ![hamemuh](https://avatars.discourse-cdn.com/v4/letter/h/3ab097/32.png) [@hamemuh](https://community.plotly.com/u/hamemuh)\
**Post date:** [December 6, 2021, 3:02pm UTC](https://community.plotly.com/t/dash-project-structure-modules-outside-the-main-project-folder/58361/2 "2021-12-06T15:02:45Z")

</div>

In the end I gave in and just placed the models folder inside dash\_project.  
Have to work within the framework given.
