[Fixed]-Urls.py raises ImportError in Heroku but not locally

1đź‘Ť

âś…

If you are in the same parent folder as the item you are trying to import, you do not put the root path to the item you are calling. So where you have “from apps.pycup import views” it only needs to be “from . import views”. What your code is actually doing with the statement you have is attempting to access the “apps.py” file under the parent pycup folder and it is not finding a function in that folder called pycup

👤martinB0103

Leave a comment