Reputation: 4898
The default name for the project folder in heroku is "app", instead of it being "myappname", so everytime I push to heroku, I have to make sure I change all my imports to the correct form for it to work. So I have to change all the
from myappname.mymodule import myclass
to
from app.mymodule import myclass
I've tried renaming the app folder from the heroku bash, but the heroku filesystem is read-only. Is there a solution for this?
Upvotes: 0
Views: 130
Reputation: 6320
The /app/~
should not matter, just as C:\etc\etc\~
on Windows or /home/user/~
on Linux would not matter. Heroku uses your Git repo, so assuming you have a folder structure like:
RootFolder
- .git folder
- .heroku folder (if any)
- requirements
- Procfile
- ProjectFolder
- AppFolder
- AppFolder
Your imports would be from ProjectFolder.AppFolder import myclass
and this would not change from your local machine to Heroku.
What is your folder structure like and where is your git
repo?
Upvotes: 1