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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:15:00+00:00 2026-06-08T02:15:00+00:00

I am running Django on Heroku. I can successfully run collectstatic, but when I

  • 0

I am running Django on Heroku. I can successfully run collectstatic, but when I go to the site it is obvious that Django is unable to find my static files. Here’s a snippet from my settings — I think it’s mostly standard stuff:

STATIC_ROOT = ''

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

PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))


# 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_DIR, 'static'),
)

# List of finder classes that know how to find static files in
# various locations.
if CLAYS_ENV == 'dev':
    STATICFILES_FINDERS = (
        'django.contrib.staticfiles.finders.FileSystemFinder',
        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
        'django.contrib.staticfiles.finders.DefaultStorageFinder',
    )

And in my case the CLAYS_ENV variable will be set to ‘dev’. Any ideas on why Django can successfully run collectstatic, but then can’t find the files afterwards?

  • 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-08T02:15:02+00:00Added an answer on June 8, 2026 at 2:15 am

    It’s recommended to serve static files through a CDN (like Amazon S3) when using Heroku. While you can still manage to serve those directly from Heroku, the same process attending dynamic requests is also serving static data, wasting processing time. Also, in case of media files, the use of a CDN is mandatory, since Heroku’s file-system is “ephimeral”: Every time you deploy new code, a new image of the Cedar stack is recreated from scratch and a new code checkout is made. Every file not Git-tracked created between deploys is lost.

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

Sidebar

Related Questions

I have a django app running on heroku. I would like to run my
I'm running a simple Django project on Heroku. It works, but if I get
I'm running Django, and I'm creating threads that run in parallel while Django runs.
I'm having trouble serving static files through my web server running mod_wsgi and dJango.
I have a Python app on Heroku running with Django. The app launches and
I'm running Django and trying to create a superuser but I keep getting the
I'm running Django on Ubuntu Server 9.04. Django works well, but nginx doesn't return
I have a django site running django-haystack with xapian as a back end. I
I've got a slightly crazy/infuriating bug with a site and CSRF. We're running Django
I'm using Python/Django on Heroku (Cedar Stack) and I've got a management command 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.