I have a portfolio site that I'm updating. There were 3 projects existing within the app before I deployed at pyanywhere. I'm looking to add a 4th post deployment (a site update if you will). I decided to add the project via the admin site. Here are the steps taken thus far.
- Added jpg to staticfiles/ directory thru pyanywhere (path: home/user/appname/staticfiles)
- Added the project to the DB using the admin site and selected the jpg loaded in step 1, tested the site and all project info loads except the jpg for the new project, all old projects are good
- Added the new jpg to static/ directory inside the app (this was the orginial static directory before deployment and is the location of all the working images when the site loads-path: home/user/appname/app/static)
- Ran collectstatic and error was given for not having set STATIC_ROOT in settings.py
- Set STATIC_ROOT as directory to staticfiles (e.g. home/user/appname/staticfiles) and it did not fix the issue
- Set static root to static/ directory in app (e.g. home/user/appname/app/static) and did not fix the issue
- Checked developer view of website and saw that all static files that were loaded had a simple url of 'static/img/some.jpg' while the newly loaded img has a url of 'static/home/user/appname/app/static/....' and no matter how I updated STATIC_URL or STATIC_ROOT nothing would change and I cannot get the new image to load. Also, even if I select an old image through the admin site (so, one that was already working for another project on the page) it won't load that image for the newly added project.
What am I missing here?