Forums

No getting my static files to load

My project is not loading static files correctly. What´s really odd, is that media files are loading perfectly, and i guess it´s the same config for both.

STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, "static")

STATICFILES_DIRS = [ BASE_DIR / "static", ]

Default primary key field type

https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

Login

LOGIN_URL = 'login'

Media

MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media')

This is how I´ve defined both, media are working, but statics, are not.

Take a look at https://help.pythonanywhere.com/pages/DjangoStaticFiles/

Having the same issue here, written twice to the support. No changes to the configs were made on my side as well.

Did you follow https://help.pythonanywhere.com/pages/DebuggingStaticFiles/ ?