Application not picking up .css file (flask/python)

前端 未结 10 1828
悲&欢浪女
悲&欢浪女 2020-11-28 03:54

I am rendering a template, that I am attempting to style with an external style sheet. File structure is as follows.

/app
    - app_runner.py
    /services
          


        
10条回答
  •  借酒劲吻你
    2020-11-28 04:08

    I have read multiple threads and none of them fixed the issue that people are describing and I have experienced too.

    I have even tried to move away from conda and use pip, to upgrade to python 3.7, i have tried all coding proposed and none of them fixed.

    And here is why (the problem):

    by default python/flask search the static and the template in a folder structure like:

    /Users/username/folder_one/folder_two/ProjectName/src/app_name/
     and 
    /Users/username/folder_one/folder_two/ProjectName/src/app_name/