title: Errors routing with flask
body: <p>I'm making my first flask app using proper routing. I have drawn the route map below. The bold names represent files (on a side note if anyone knows how to draw nice route paths on here please do say!)</p>
  
  <p>config.py<br/>
  start.sh<br/>
  start.sh<br/>
  wgis.py<br/>
  <strong>Application</strong><br/>
   ....static<br/>
   ....__init_ _.py (ignore the space)<br/>
   ....templates<br/>
   ....functions.py<br/>
   ....routes.py<br/>
   ....second.py<br/>
   ....<strong>plotlydash</strong><br/>
  .........dashapp.py<br/>
  <strong>myenv</strong><br/>
   ....bin<br/>
    ....lib<br/></p>
  
  <p>I am having a couple of issues. These are:<br/></p>
  
  <ol>
  <li><p>I am unable to start the program without the command python -m flask run as opposed to just flask run alone. </p></li>
  <li><p>I cannot get the dash app to be added to the application. The error code from <strong>init</strong>.py returns 'No module named plotlydash.dashboard'. It seems unable to look into the directory plotlydash and find dashapp. I have had similar issues trying to import python files from different files. </p></li>
  </ol>
  
  <p>If anyone has any advice on either of these issues it would be great! I will post the minimal amount of code below which I think is needed (for brevity), but if miss anything out please let me know and ill get you it. </p>
  
  <p>Cheers!</p>
  
  <p>Start.sh</p>
  
  <pre><code>export FLASK_APP = wsgi.py
  flask run
  </code></pre>
  
  <p>wgsi.py</p>
  
  <pre><code>from application import create_app
  
  app = create_app()
  
  if __name__ == "__main__":
  app.run(host='0.0.0.0')
  </code></pre>
  
  <p><strong>init</strong>.py</p>
  
  <pre><code>from flask import Flask, request
  
  
  
  def create_app():
      app = Flask(__name__, instance_relative_config=False)
      app.config.from_pyfile('/Users/ianholdroyd/Documents/Code/Graphs/Activity/web/practive/config.py')
  
  with app.app_context():
      from . import routes
  
      from .plotlydash.dashapp import create_dashboard
      app = create_dashboard(app)
  
      # Compile static assets
  
      return app
  </code></pre>
  
  <p>Requirements.txt</p>
  
  <pre><code>    Brotli==1.0.7
  click==7.1.2
  dash==1.12.0
  dash-core-components==1.10.0
  dash-html-components==1.0.3
  dash-renderer==1.4.1
  dash-table==4.7.0
  Flask==1.1.2
  Flask-Assets==2.0
  Flask-Compress==1.5.0
  future==0.18.2
  itsdangerous==1.1.0
  Jinja2==2.11.2
  MarkupSafe==1.1.1
  numpy
  pandas
  pathlib==1.0.1
  plotly==4.7.1
  python-dateutil==2.8.1
  python-dotenv==0.13.0
  pytz==2020.1
  retrying==1.3.3
  six==1.14.0
  webassets==2.0
  Werkzeug==1.0.1
  flask_kvsession
  datetime
  geopy
  gpxpy
  </code></pre>