在heroku上找不到所有静态(资产)

时间:2015-05-16 12:38:35

标签: python django heroku

我已经在heroku上部署了一个Django 1.8,并且根本找不到任何静态文件。我无法弄清楚我做错了什么:

# settings.py

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'app123'
)

STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = '/static/'
APPEND_SLASH = False

我将所有静态文件放在localhost上的myproject/app123/static/(css|images|js)中。当我运行heroku run python manage.py collectstatic时,它不会复制任何内容:

$ heroku run python manage.py collectstatic
Running `python manage.py collectstatic` attached to terminal... up, run.7135

You have requested to collect static files at the destination
location as specified in your settings:

    /app123/staticfiles

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes

0 static files copied to '/app123/staticfiles', 117 unmodified.

0 个答案:

没有答案