The collectstatic command does not start when deployed to Heroku, but the setup is fine

Things I checked:

  • my collectstatic(yes, I call it so as to reduce the configuration with the source directories static) in my repo (via file .gitkeep) (as indicated in the heroku documentation )
  • heroku run python manage.py collectstatic --dry-run --noinputworks (offered here )
  • collectstatic is not forcibly disabled:heroku config:add DISABLE_COLLECTSTATIC=0
  • I push the new commit (so the hero actually deploys)

However, it collectstaticdoes not start. What else can I check?

EDIT

In addition, I correctly identify STATIC_ROOTin settings.py. Relevant section below:

STATIC_URL = '/static/'

STATIC_ROOT = os.path.join(BASE_DIR, 'collectstatic/')

STATICFILES_DIRS = (
    os.path.join(BASE_DIR, 'static'),
)

EDIT2

My installed applications are just django 1.9:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
]

EDIT3

, , : DISABLE_COLLECTSTATIC 1 ( ) heroku, , 0.

, Heroku ? , - heroku.

+4
1

, , , Heroku , collectstatic.

, Heroku DISABLE_COLLECTSTATIC.

, , DISABLE_COLLECTSTATIC=0 collectstatic. , , :

heroku config:unset DISABLE_COLLECTSTATIC

, Heroku , , -, , DISABLE_COLLECTSTATIC=0 collectstatic - .

0

Source: https://habr.com/ru/post/1623237/


All Articles