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

  • SEARCH
  • Home
  • 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 9068293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:09:25+00:00 2026-06-16T17:09:25+00:00

I am relatively new to Django development.I have a css file inside a /static/css

  • 0

I am relatively new to Django development.I have a css file inside a /static/css directory.

When I try to run the url no CSS is applied to my template. the python manage.py runserver window shows following error

[01/Jan/2013 20:00:40] “GET /home/prat/PROJECT_ROOT/SOURCE_ROOT/static/css/Style.css HTTP/1.1” 404 2207

Can someone please point me how to debug this. I have read multiple stackoverflow questions and added the following setting in my settings.py.

PROJECT_R = os.path.abspath(os.path.dirname(__name__))
PROJEECT_R = PROJECT_R + "../"
STATIC_ROOT = os.path.join(PROJECT_R, "static")
STATIC_URL = 'static/'

.
├── manage.py
├── README
├── SOURCE_ROOT
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── settings.py
│   ├── settings.pyc
│   ├── urls.py
│   ├── urls.pyc
│   ├── wsgi.py
│   └── wsgi.pyc
├── static
│   ├── css
│   │   ├── README
│   │   └── Style.css
│   ├── images
│   │   └── README
│   └── js
│       └── README
├── template
│   ├── base.html
  • 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-06-16T17:09:27+00:00Added an answer on June 16, 2026 at 5:09 pm

    Here’s how I usually go about managing dynamic project root:

    from os.path import dirname, realpath, join
    PROJECT_ROOT = dirname(realpath(__file__))
    

    And then further below, the static root:

    STATIC_ROOT = join(PROJECT_ROOT, 'static/')    
    

    And then you reference static files like so:

    {{ STATIC_URL }}css/Style.css
    

    EDIT:

    See the documentation for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am relatively new to django. I have defined my db schema and validated
I am relatively new to Django and have really been struggling with an implementation
I am relatively new to Django, and have experience with Rails. In Rails you
I`m relatively new at Android development, although I have created a few basic applications.
I'm still relatively new to Django and have just started poking around at Django-CMS,
Im relatively new to the Android world but I have a quick question. I
I'm relatively new to Django and I'm designing a website that primarily needs usability
Relatively new to C#; hopefully I'm just overlooking something simple. I have a form
I'm relatively new to JQuery and would like to try something. I just followed
I am new to using QT and relatively new to C++. I have a

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.