Questions tagged [collectstatic]

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.

118 questions
0
votes
1 answer

Django + Heroku + S3: boto -> local variable "region_name" referenced before assignment

I'm getting a very strange error that got me really stuck for many hours now. I did my deploy with Heroku for the first time and am using S3 for Media files. First thing I noticed was that I never had a migration working successfully after…
A Campos
  • 753
  • 3
  • 10
  • 31
0
votes
0 answers

Collectstatic error on deploying django app

I am getting error when trying to deploy my django app (the download and installation of packages went fine): $ python manage.py collectstatic --noinput Traceback (most recent call last): execute_from_command_line(sys.argv) File…
user828647
  • 505
  • 1
  • 10
  • 27
0
votes
1 answer

Heroku error using collect static with Django 1.10

My app runs normally on my local and I can run python manage.py collectstatic --noinput without error. But when pushing to Heroku at the end of the build process I get the following error: $ python manage.py collectstatic --noinput Traceback…
0
votes
2 answers

Django: collectstatic works but doesnt find the correct static folder

I'm trying to run my django site in deployment mode with DEBUG=False. In fact when i do a python manage.py collectstatic it will collect all static files into my folder /mysite/static. But when i load my homepage my static files wont load Not Found…
ePascoal
  • 2,362
  • 6
  • 26
  • 44
0
votes
1 answer

How can I play a static mp3 file on static Javascript on a Django application?

In my Django Application, I am trying to play a mp3 file in a function in my javascript file. This JS file is loaded statically by command collectstatic from Django. I couldn't find a way to reference this mp3 file. Both are in the same folder in…
0
votes
1 answer

Duplicate file name while serving Django cached static assets from Heroku + S3

I'm having a weird issue with my Django app deployed in Heroku. I'm using django-herokuapp with an AmazonS3 bucket and django-heroku-memcacheify for the cache. My production settings look like: from .base import * import dj_database_url import…
Jordi
  • 886
  • 11
  • 11
0
votes
1 answer

Why my django static file have number in the end

I have to debug some existing Django project build me other develeopers. In my local developement environment all the static files have path like /static/myapp/module/user.js But when i see the html of testing on tetsing server then i can see the…
user3214546
  • 6,523
  • 13
  • 51
  • 98
0
votes
3 answers

Collectstatic is copying too many files on my openshift instance

I would like to use the collectstatic option in my openshift django instance but it appears to be copying loads of unneeded files. An example line of output Pretending to copy…
Dennis_M
  • 340
  • 1
  • 4
  • 10
0
votes
1 answer

How do I put a background image on the body in css with django using static?

How do I put a background image on the body in css with django using static? Is it something like this? I can't find any information on this. Thanks. {% load static %} body { padding: 0 20px; background-image: url("{% static…
tomter2014
  • 303
  • 3
  • 11
0
votes
1 answer

strange django static file behaviour

I'm getting 404 for static files when DEBUG=False in my settings. The file is served fine when DEBUG=True. I'm looking at the docs and all my configs seem OK to me. # my_settings.py STATIC_ROOT = os.path.join(PROJECT_PATH, 'static') STATIC_URL =…
Rich Tier
  • 9,021
  • 10
  • 48
  • 71
-1
votes
1 answer

Django collectstatic does not collect media files from react npm build folder

I have a frontend react app, after using npm run build it creates build folder with: build favicon.ico index.html service-woker.js static After using django's python manage.py collectstatic I noticed what django has done was that it pulls out…
Travis Tay
  • 350
  • 2
  • 10
-1
votes
1 answer

Django collectstatic recollects module static files when deployed to Heroku

My issue is that every time I deploy my code to Heroku, when collecting static, all the static files within modules are copied again, even if they haven't changed. This means my free amazon S3 bucket copy limit is being reached after just a few…
-1
votes
1 answer

collectstatic collects additional files to STATICFILES_DIRS in django

My settings looks like this: STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, "static/") STATICFILES_DIRS = ( os.path.join(BASE_DIR, "polls/static/"), ) So now when I run collectstatic it also collects stuff…
Tom
  • 2,545
  • 5
  • 31
  • 71
1 2 3 4 5 6 7
8