Yesterday, I created this post: DjangoRestFramework browsable api looks different locally vs when deployed on server?
Basically, when I did python manage.py ru
This is what worked for me.
Remove any staticfiles directives from .config
files. Find Static Files section under the Software Configuration. The left column is each of your /static/
url. The right is your static folder relative to your parent directory.
Make sure your STATIC_ROOT
setting matches the value on the right. Don't forget the trailing /
.
Pasting my settings anyway.
STATIC_URL = '/static/'
STATICFILES_DIRS = ('assets',)
STATIC_ROOT = os.path.join(BASE_DIR, '..', 'www', 'static')
And this is what my folder structure looks like relative to the settings files
project/
├── __init__.py
├── settings
│ ├── base.py
│ ├── __init__.py
│ ├── local.py
│ ├── production.py
wsgi.py
, urls.py
are located in project
folder. www
folder is one level above project
folder.
Hope this saves your Sunday at least.