The problem is that static files from Django app are not being collected in pythonanywhere. After the command
python manage.py collectstatic
In the directory
/home/user/user.pythonanywhere.com/static
Only the admin folder appears. Settings.py:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp'
]
Css file location:
+---myapp
| +---static
| | \---myapp
| | \---css
| | \---myapp.css
When I run the command python manage.py collectstatic in my local command line, static files from the application are collected, the problem is in pythonanywhere.
All actions are standard, I did everything strictly according to the guide, I cannot understand what's the matter. Thanks a lot
I have read all the articles on this topic on pythonanywhere and everything I found on stackoverflow and in the documentation, but nothing helps to solve the problem.
https://help.pythonanywhere.com/pages/DjangoStaticFiles https://help.pythonanywhere.com/pages/DebuggingStaticFiles/ https://help.pythonanywhere.com/pages/StaticFiles