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 6997359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:16:25+00:00 2026-05-27T20:16:25+00:00

I want to use static files to load my css with runserver command. The

  • 0

I want to use static files to load my css with runserver command. The problem is that i tried all the solution i found here on stackoverflow and also in django docs, but it doesnt works at all… I dont know what can i do…
If i set

STATIC_URL = '/static/'
STATIC_ROOT = 'C:\Users\Max\Works\www\mysite\mysite\static'
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
)

I thought it was enough… Am i missing something?
Can you tell me what is the best setting for have static files in develompent envirnoment?
Thanks in advice…

EDIT(1)
I already putted in my template {{ STATIC_URL }}css/dark-grey.css” and ofc the css is in C:\Users\Max\Works\www\mysite\mysite\static\css\dark-grey.css, i really can’t get what is wrong…

  • 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-27T20:16:26+00:00Added an answer on May 27, 2026 at 8:16 pm

    In your settings.py

    DEBUG=True

    As per the docs:

    This view is automatically enabled by runserver (with a DEBUG setting
    set to True).

    Using the URL pattern is a way to force it, which I personally don’t even have to do in my project as long as DEBUG=True. You would always have DEBUG on when you are developing, and when you switch to production you aren’t even using the development server anyways, so you would be pointing your production server to the static location.

    This is a snippet of my static settings from my settings.py. I do not manually have to add that static view URL

    import os
    
    DEBUG = True
    
    PROJECT_ROOT = os.path.dirname( __file__ )
    PROJECT_NAME = os.path.basename(PROJECT_ROOT)
    
    STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static/')
    STATIC_URL = '/static/'
    
    # Additional locations of static files
    STATICFILES_DIRS = (
        # Put strings here, like "/home/html/static" or "C:/www/django/static".
        # Always use forward slashes, even on Windows.
        # Don't forget to use absolute paths, not relative paths.
        os.path.join(PROJECT_ROOT, 'web/'),
    )
    
    # List of finder classes that know how to find static files in
    # various locations.
    STATICFILES_FINDERS = (
        'django.contrib.staticfiles.finders.FileSystemFinder',
        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    )
    
    
    TEMPLATE_CONTEXT_PROCESSORS = (
        ...
        'django.core.context_processors.static',
        ...
        ...
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Want to know which one is preferred while coding to use Static Methods
I want to use CodeDOM to both declare and initialize my static field in
I have created a public static class utils.cs I want to use it in
I have a transaction log file in CSV format that I want use to
Below is my stored procedure. I want use stored procedure select all row of
I know that I can use normal html files in ASP.NET MVC; however I
Currently I have a static class that I use as my logging module. I’ve
I have a Java web application running on Tomcat. I want to load static
I have an express app that I want to use the connect-form module on
I'm trying to use SVG graphics in QIcons. I have a static library that

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.