Allowed host in setting for all domain === ['*'] Deploying to pythonanywhere.com
in files upload your compressed rar file
use bash console and unrar your file after locating unrar x your_file.rar and in bash using pip command install required python lib.
go to web it will show following :
Code: What your site is running.
Source code: /home/imageupload/shoes_shop/
Go to directory Working directory: /home/imageupload/
Go to directory WSGI configuration file:/var/www/imageupload_pythonanywhere_com_wsgi.py Python version: 3.10
go to wsgi configuration to edit it
import os import sys
path = '/home/imageupload/shoes_shop/' if path not in sys.path: sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'shoes_shop.settings'
from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
in web add urls in following way : Static files: Files that aren't dynamically generated by your code, like CSS, JavaScript or uploaded files, can be served much faster straight off the disk if you specify them here. You need to Reload your web app to activate any changes you make to the mappings below.
URL Directory Delete /media/ /home/imageupload/shoes_shop/media /static/ /home/imageupload/shoes_shop/static
after everything is complete relode your site and make sure allowed host setting in django app settings is correct.