I am new to django. Static file cannot work.bt i am set perfect directories for static.Can anyone help me to solve this?

Viewed 7

This is my static file setting

STATIC_URL = '/static/'

STATICFILES_DIR = [os.path.join(BASE_DIR,'static'),]

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

HTML file

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">

{% load static %}

<link type="stylesheet" href="{% static 'css/style.css' %}">    

<title>Basic</title>
<div class ='front'>

<h1>Welcome to learning process</h1>

<h2>hardwork never fails</h2>

<h3>my name is {{name}} </h3>

</div>

It run on the browser but it cannot get a style. When i check a page source it will give prober style content which I was inserted by me.

0 Answers
Related