Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

161
Visualizações
CSS file not found

I am going crazy with linking stylesheet file to my 'base.html' template which I use in my whole project. here is path to file I want link:

C:\forum_project\static\main\css\style.css

Below is code snippet from 'base.html' from head section.

<meta charset="UTF-8">
<title>Django Developers Forum</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="{% static 'main/css/style.css' %}">

As you can see the last line is attempt to derive from this stylesheet.

I am getting following information in console, when browser tries to send GET request for stylesheet.

[16/Apr/2017 23:55:14] "GET /static/main/css/style.css/ HTTP/1.1" 404 1670

Any suggestions what I am doing wrong?

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Just remove final slash to url:

href="{% static 'main/css/style.css' %}

I would suggest to you to move bootstrap and jquery including tags inside the body, just before the body closing tag.

about 4 years ago · Santiago Trujillo Relatório

0

C:\forum_project\main\templates\base.html

C:\forum_project\static\main\css\style.css

Use this code :

<link rel="stylesheet" type="text/css" href="../../static/main/css/style.css">
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda