Answer the question
In order to leave comments, you need to log in
Changes from the css file are not loaded on the server, what should I do?
I'm building a site, and when I include css properties in the format
link rel="stylesheet" href="../../static/css/includes/header.css"
python mange.py runserver
link rel="stylesheet" href="{% static 'css/includes/main-menu.css' %}"
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'img/logos.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'img/logos.png' %}">
{% block links %}
{% endblock links %}
<title>
{% block title %}
{% endblock title %}
</title>
</head>
<body>
<header>
{% include 'includes/header.html' %}
</header>
<main>
{% block main_data %}
{% endblock main_data %}
</main>
<footer>
{% include 'includes/footer.html' %}
</footer>
</body>
</html>
{% extends 'base.html' %}
{% load static %}
{% block links %}
<link rel="stylesheet" href="{% static 'css/includes/slick.css' %}">
<link rel="stylesheet" href="{% static 'css/includes/slick-theme.css' %}">
<link rel="stylesheet" href="{% static 'css/includes/main-menu.css' %}">
{% endblock links %}
{% block title %}
Main-menu
{% endblock title %}
{% block main_data %}
<section class="slider">
<div class="container">
<div class="slider__inner">
<div class="slider__item">
<div class="slider__item-title">
Вы можете многому научиться
</div>
</div>
<div class="slider__item">
<div class="slider__item-title">
Ещё какой-то текст
</div>
</div>
<div class="slider__item">
<div class="slider__item-title">
Может быть реклама
</div>
</div>
<div class="slider__item">
<div class="slider__item-title">
Их можно удалить
</div>
</div>
<div class="slider__item">
<div class="slider__item-title">
Или если понадобиться добавить
</div>
</div>
</div>
</div>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="../../static/js/main.js"></script>
<script src="../../static/js/slick.min.js"></script>
{% endblock main_data %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question