I'm new to PythonAnywhere and Django. I have been following the Django "Poll project on PythonAnywhere" tutorial and "Following the official Python tutorial on PythonAnyshere".
I have done partially this project before, with Python 3.9 and Django 3.16" and completed 3 to 4 parts successfully.
This time, I stuck in the start and NOT getting the Django default rocket page after installing and configuring as mentioned in the project instructions. I get to the part where I edit mysite/mysite/wsgi.py and checked it at least 5 times for any typo. I also edit mysite/mysite/setting.py and changed ALLOWED_HOST = ['*'] as well as I also tried with ['asansari.pythonanywhere.com']. After loading the page, I can get to the default page that reads "Hello, World! This is the default welcome page for a PythonAnywhere hosted web application." NOT the Django default page with the rocket.
My codes for wsgi.py
import os
import sys
path = os.path.expanduser('~/mysite')
if path not in sys.path:
sys.path.insert(0, path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
from django.core.wsgi import get_wsgi_application
from django.contrib.staticfiles.handlers import StaticFilesHandler
application = StaticFilesHandler(get_wsgi_application())
Line in settings.py
ALLOWED_HOSTS = ['asansari.pythonanywhere.com']
Is it the new version of Django 3.17! or something I am missing?
Please help me! I will appreciate it. Thanks.