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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:36:26+00:00 2026-06-16T19:36:26+00:00

While deploying a Django app. I am having problem with static files. I am

  • 0

While deploying a Django app. I am having problem with static files. I am having JS and CSS files in static directory. But browser is not able to find those files. I am having same files and settings on local machine that is ubuntu same as server OS, and have working on local. Although it has same settings but I am pasting that static directory and files setting below.

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = ''

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = ''

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(ROOT_PATH,'static')

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'


# Additional locations of static files
STATICFILES_DIRS =(
                os.path.join(ROOT_PATH,'static'),
)

# 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',
#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

Here root path in above code is defined before that is :

import os
#from django.contrib.sites.models import Site
ROOT_PATH = os.path.dirname(__file__)

I am using mod_wsgi with apache2, in my understanding it should find the files when it is loading /somefoldername then browser should go in that directory but didn’t get where is problem. To know about environment and wsgi settings e.t.c. I am following here is question in which I posted my wsgi file details and way it is working: 500 server error on Django site after shifting to server

I am many time having issues while finding apps and other templates and modules etc. even in syncdb commmand on server, for templates I appended root path and it started working also added project path in wsgi file but still that static files issue is not solved.

  • 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-16T19:36:28+00:00Added an answer on June 16, 2026 at 7:36 pm

    The Django documentation covers the topic. See:

    • https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#serving-files
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having an odd problem while deploying a Django site using Fabric. I've configured
I'm developing a small application but I'm having problem while deploying the application on
I'm deploying my Django app with Dotcloud. While developing locally, I had to make
While deploying my web service I am not able to connect my Tomcat server
While deploying a dwr web app, i'm continuously getting this error. I dont know
I just recently started having issues while deploying EARS within websphere. The error I
I have an issue while deploying my nodejs app on dotCloud regarding the dependencies.
I'm running Rails 3.1 apps on 3 app servers (3 nodes). While deploying, the
While deploying my app in JBOSS5 (earlier i was deploying in JBOSS4), I get
This a problem I already had twice while deploying an application online and 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.