1👍
✅
Simply you can try following way:
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
And in your template, load the static using following tag:
{% load static %}
0👍
STATIC_ROOT
(and all other path-related options) must be a string, not a Path.
Cast it in the assignment:
STATIC_ROOT = str(BASE_DIR / "staticfiles")
👤AKX
- [Answered ]-Many to many vs new object with compound foreign keys in django
- [Answered ]-How to use more than one foreign key in mapping django models
- [Answered ]-Contribute to django via github
- [Answered ]-How to include my base template with custom context in Django comment templates?
Source:stackexchange.com