Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!