static css is not fetching style in django

Solutions on MaxInterview for static css is not fetching style in django by the best coders in the world

showing results for - "static css is not fetching style in django"
Zain
15 Mar 2019
1STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'), ]
Maya
01 Jan 2017
1First : create static folder in this path (tree path):
2
3-------manage.py
4-------db.sqlite3
5-------static #this si your static folder!
6-------appfolder
7Second : put you CSS (or JavaScript or an image) in your static folder like this:
8
9-----static
10---------1.css
11---------2.js
12Third : put this at the bottom of your setting.py file:
13
14STATIC_URL = '/static/'
15STATIC_ROOT = os.path.join(BASE_DIR, 'static')
164th : call your static file in your template:
17
18{% load staticfiles %}
19<link rel="stylesheet" href="src="{% static "1.css" %}"">
20<link rel="stylesheet" href="src="{% static "1.css" %}"">
21It should work.
22
23Note : use {% load static %} at the start of the css file