"static css is not fetching style in django" Code Answer's
You're definitely familiar with the best coding language CSS that developers use to develop their projects and they get all their queries like "static css is not fetching style in django" answered properly. Developers are finding an appropriate answer about static css is not fetching style in django related to the CSS coding language. By visiting this online portal developers get answers concerning CSS codes question like static css is not fetching style in django. Enter your desired code related query in the search bar and get every piece of information about CSS code related question on static css is not fetching style in django.
static css is not fetching style in django
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'), ]
static css is not fetching style in django
First : create static folder in this path (tree path):
-------manage.py
-------db.sqlite3
-------static #this si your static folder!
-------appfolder
Second : put you CSS (or JavaScript or an image) in your static folder like this:
-----static
---------1.css
---------2.js
Third : put this at the bottom of your setting.py file:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
4th : call your static file in your template:
{% load staticfiles %}
<link rel="stylesheet" href="src="{% static "1.css" %}"">
<link rel="stylesheet" href="src="{% static "1.css" %}"">
It should work.
Note : use {% load static %} at the start of the css file
All those coders who are working on the CSS based application and are stuck on static css is not fetching style in django can get a collection of related answers to their query. Programmers need to enter their query on static css is not fetching style in django related to CSS code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about static css is not fetching style in django for the programmers working on CSS code while coding their module. Coders are also allowed to rectify already present answers of static css is not fetching style in django while working on the CSS language code. Developers can add up suggestions if they deem fit any other answer relating to "static css is not fetching style in django". Visit this developer's friendly online web community, CodeProZone, and get your queries like static css is not fetching style in django resolved professionally and stay updated to the latest CSS updates.