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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:27:58+00:00 2026-05-31T02:27:58+00:00

Here is the directory structure pf project. mysite \media \static \images \css base.css \js

  • 0

Here is the directory structure pf project.

mysite
  \media
  \static
       \images
       \css
           base.css
       \js 
  \templates
       base.html
  \settings.py #and other .py files

Now say if i have a file C:\mysite\static\css\base.css or an image C:\mysite\static\images\ball.png .How am i going to serve it using django development server. I know this is not the recomment way, but just in development i want this to work. I have read the docs and other answers on stackoverflow but they don’t seem to work. May be i am being confused by media and static and urlpatterns. I have spent hours trying to figure this out but still no luck.
I am new to django and all this seems to me just an overkill to get a css or image showing up.
What changes or editing do i need to make for this to work. How will i referece the image and css in template?

  • 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-31T02:28:00+00:00Added an answer on May 31, 2026 at 2:28 am

    Here is the how to for static files from the Django documentation that takes you through the whole process step-by-step.

    Add the following to your urls.py

    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    
    # ... the rest of your URLconf goes here ...
    
    urlpatterns += staticfiles_urlpatterns()
    

    Then ‘This view is automatically enabled and will serve your static files at STATIC_URL when you use the built-in runserver management command. … This will inspect your STATIC_URL setting and wire up the view to serve static files accordingly. Don’t forget to set the STATICFILES_DIRS setting appropriately to let django.contrib.staticfiles know where to look for files additionally to files in app directories.’

    It is worth mentioning that this is most definitely inappropriate for deployment, but will work well for development.

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

Sidebar

Related Questions

I'm having trouble adding Facebook Connect to my iPhone Project. Here's the directory structure:
I have a very simple directory structure: Project Project/src Project/build Source files are in
I have a directory structure D:\workspace 2\project\lib where I have all the files AgentMain.java(which
here is my directory structure. /user/a /user/b /user/b inside folder a,b,c there is a
I am planning my directory structure for a linux/apache/php web project like this: Only
This is the directory structure of the project (maven2 is used): pom.xml /src /main
Which archetype was used here: http://maven.apache.org/guides/getting-started/index.html It says a directory structure should have been
folks, I have the directory structure like this: webapps |-- static_media |-- django |---project
here is the structure of my project. proj ---src ----main ----java ----Main.java ----resources ----res.txt
Here is my directory structure: /features/ninja.feature /features/step_definitions/ninja_steps.rb /src/ninja.rb When I run cucumber in the

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.