CollectStatic is a Django Command that collects the static files into STATIC_ROOT directory as per specified in the base.py config files for your django applications.
Questions tagged [collectstatic]
118 questions
4
votes
0 answers
How to remove old static files while keep on serving until deployment succeeds?
I'm having an issue with static files piling up on S3 since i'm using the ManifestFilesMixin mixin to give static files a unique name (so clients are forced to load the new content). Since the name is different on each version (duhhh) it's written…

Paul Bormans
- 1,292
- 16
- 22
4
votes
1 answer
collectstatic command not run when deploying to Heroku, but setup is perfectly fine
Things I have verified:
my collectstatic directory (yes, I call it like that, to reduce confussion with static source directories) is in my repo (via a .gitkeep file) (as advised in the heroku documentation)
heroku run python manage.py…

blueFast
- 41,341
- 63
- 198
- 344
3
votes
2 answers
Unable to run collectstatic , "references a file which could not be found: js/canvas-to-blob.min.js.map"
I'm trying to deploy a django react application on heroku , which uses whitenoise to handle staticfiles and cloudinary to handle media files , but when i try to run python manage.py collectstatic it returns an error 'js\canvas-to-blob.min.js'…

Dexter
- 33
- 5
3
votes
0 answers
Django: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path
I'm a beginner to django and trying to figure out how to incorporate ckeditor into a blog. I'm stuck at the step of copying ckeditor static files into the static root. No matter what fix I try, when I run python manage.py collectstatic, I get the…

Aaron
- 31
- 1
- 3
3
votes
0 answers
Bootstrap.min.css.map missing
I cannot figure it out, how to make the server read bootstrap.min.css.map file.
Which of the way below would finally make it work?
{% block script %}{%…

ma-ku
- 576
- 4
- 8
3
votes
1 answer
Issue deploying django app on heroku / module not found error
I know that there are so many topics on this problem but I didn't find those helpful.
I am trying to push my Django app on Heroku but during the transfer, I receive a: ModuleNotFoundError : No module named 'dashboard_app.settings'
It happens when…

Dim17300
- 75
- 5
3
votes
1 answer
Missing staticfiles manifest entry while rendering template in Django TestCases
I'm running into a problem with running TestCases in which I am rendering the template of a page in order to test pieces of the HTML that are produced.
Here is an example of the kind of test I am running:
test.py
from django.test import…

TAH
- 1,658
- 1
- 19
- 37
3
votes
0 answers
How to tell Django collectstatic to use Amazon S3?
I have followed this howto to setup django + S3. Specifically:
import os
# AWS credentials
AWS_STORAGE_BUCKET_NAME = os.environ['AWS_STORAGE_BUCKET_NAME']
AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME
# boto…

blueFast
- 41,341
- 63
- 198
- 344
2
votes
1 answer
django collectstatic 'AppConfig' object has no attribute 'ignore_patterns'
I recently upgraded django to 3.2.5, after which admin template was not loading correctly especially in model pages, please see the screenshot,
I decided to run,
python manage.py collectstatic
but then I am receiving following error
Traceback…

muniryasir
- 109
- 1
- 8
2
votes
1 answer
Prevent collectstatic from trying to access a database
I have a Dockerfile with a multi-stage build in which I'm trying to run collectstatic to get all the static files and copy them into the final docker image.
At this moment I don't have a database to access, but as collectstatic is trying to access…

GiftZwergrapper
- 2,602
- 2
- 20
- 40
2
votes
2 answers
What does the '--noinput' option do when collecting static files using django?
So I was having issues collecting my static files using the 'python manage.py collectstatic' command. it returned "CommandError: Collecting static files cancelled." I was searching and found the solution reading this post Django collecstatic with…

Spencer j potts
- 46
- 5
2
votes
1 answer
Django and Collectstatic Issue
I'm trying to deploy my Django web Application (2.0.1) thanks to Nginx and I'm getting an issue.
I configured the new Ubuntu server, add my Django Project and I downloaded nginx.
My Django project looks like :
Mysite
├── App1
├── App2
├── App3
├──…

Essex
- 6,042
- 11
- 67
- 139
2
votes
4 answers
How do I disable whitenoise for local development of my Django project?
I've set up a Django project deployed on Heroku using the Heroku Django project template. Heroku's template uses whitenoise to collect static files in a /static/ directory located on my project root.
This is great for my production environment;…

Sam
- 1,952
- 1
- 18
- 31
2
votes
1 answer
Django collectstatic not does not find admin media content
Im running a Django 1.8.2 project on Ubunutu with Virtualenv and Gunicorn etc. For some reason collectstatic does not get the admin media, but it does work on my local dev environment on osx.
Im not sure where the problem comes from? Is it the…

Harry
- 13,091
- 29
- 107
- 167
2
votes
1 answer
x-amz-acl being set incorrectly when using collectstatic with latest version of Boto, Pipeline, and Storages
I'm in the process of bringing my app's dependencies up-to-date. I made the following changes to requirements.txt:
boto: upgraded to 2.34.0
django-pipeline: upgraded to 1.4.2
django-require: upgraded to 1.0.6
django-storages: was on latest…

TAH
- 1,658
- 1
- 19
- 37