Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6761789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:14:00+00:00 2026-05-26T14:14:00+00:00

How to include stylesheets and images into a 404 page template using the default

  • 0

How to include stylesheets and images into a 404 page template using the default view?

I created a 404.html file in the root of the site’s templates directory:

<!DOCTYPE html>
<html>
<head>
    {% load static %}
    <link rel="stylesheet" href="{% get_static_prefix %}css/404.css" />
</head>
<body class="page-404">
    <p>Not found.</p>
</body>
</html>

Ironically, the 404.css is not found. The 404.css file is located in one of the apps’ static directory.

The server is manage.py runserver. On every other page static files are served just well.

Update: It appears, after setting DEBUG = False in the settings.py, static files on all other pages stopped being served, too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T14:14:01+00:00Added an answer on May 26, 2026 at 2:14 pm

    It appears, staticfiles app does work with DEBUG = False. Only it doesn’t pick up files from individual apps’ static directories. It would serve files from the global STATIC_ROOT directory (from settings.py).

    To get the static files copied to STATIC_ROOT, you need to run the collectstatic command:

    python manage.py collectstatic
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site with index.php in the root folder, images in /img ,
When I make include <%@include file=../WEB-INF/jspf/Header.jspf %> The images inside the header are not
If I include an HTML page on a PHP page (say, index.php) with the
I have created a web page (ASP.NET) that includes a stylesheet to mimic Dynamics
#include <iostream> using namespace std; int main() { double u = 0; double w
#include<iostream> using namespace std; class A { int a; int b; public: void eat()
#include <iostream> using namespace std; class Base { public: Base(){cout <<Base<<endl;} virtual ~Base(){cout<<~Base<<endl;} virtual
When defining something like a background image URL in a CSS file, when using
The image below (at the very bottom) is the file structure for the site
I have an index.html.erb page timesheet that has various js and jquery tables and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.