Try loading staticfiles
instead of static
. I think this is tied to INSTALLED_APPS
on your leo5.settings
module. Also, it could be a moot point but try adding a space in between static
and the link to your static file content.
219220-image.png
219322-image.png
---
EDIT: 2022 July 12 I've got an update @Syed Ali Hussnain Gillani . I was moving some static content around as well and ran into a similar problem where content wasn't being loaded correctly. I however hit an staticfiles.E002
which led me to this stackoverflow answer and was able to resolve it with the following in my settings.py
:
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static'),
]
#STATIC_ROOT = posixpath.join(*(BASE_DIR.split(os.path.sep) + ['static']))
STATIC_URL = '/static/'
where BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))