I recently opened python anywhere account to host my website for free. For that, I read the docs in python anywhere, but I added the project name mistakenly in wsgi.py file. so, after all setup. I reloaded the site.I named the folder name as "my-portfolio". But it showed error " ModuleNotFoundError: No module named 'my-portfolio'". in error log. So I deleted the web app, deleted the files too and again clone the website from git and done with all the procedures noted in doc. This time, I renamed the folder name as "portfolio". After all configurations, I reloaded the site and, checked the errors log it again shows the same error " ModuleNotFoundError: No module named 'my-portfolio'". I don't know, Wsgi.py I changed, but it shows first-time wsgi.py file I wrote. So, wsgi.py file won't be deleted? or backed up first time and continue with this conf?. Please sort out this problem. Thanks in advance.
wsgi.py
+++++++++++ DJANGO +++++++++++
To use your own django app use code like this:
import os import sys
assuming your django settings file is at '/home/Yabesh/mysite/mysite/settings.py'
and your manage.py is is at '/home/Yabesh/mysite/manage.py'
path = '/home/Yabesh/portfolio' if path not in sys.path: sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'portfolio.settings'
then:
from django.core.wsgi import get_wsgi_application application = get_wsgi_application()