我想在我的 openshift django 实例中使用 collectstatic 选项,但它似乎正在复制大量不需要的文件。
输出示例行
Pretending to copy '/var/lib/openshift/519017e25973ca1ead00035b/app-root/runtime/dependencies/python/virtenv/lib64/python2.7/site-packages/Django-1.5.2-py2.7.egg/django/contrib/contenttypes/locale/da/LC_MESSAGES/django.po'
以下是 settings.py 中的一些片段
if 'OPENSHIFT_HOMEDIR' in os.environ:
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'wsgi.application'
DEBUG = False
DB_ROOT = os.environ['OPENSHIFT_DATA_DIR']
STATICFILE_DIR = os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'wsgi', 'static', 'mysite')
TEMPLATE_DIR = os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'wsgi', 'templates')
STATIC_ROOT = os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'wsgi', 'static')
STATICFILES_DIRS = (STATICFILE_DIR,)
"ls -R $OPENSHIFT_REPO_DIR/ | grep virtualenv" 没有结果
ls -R $OPENSHIFT_REPO_DIR../.. | grep virtenv 确实显示了一堆旧的 virtenv
此外,这似乎很奇怪: > ls -la $OPENSHIFT_HOMEDIR
drwxr-xr-x. 11 xxxx xxxx 4096 Jan 26 11:45 python
lrwxrwxrwx. 1 root root 50 Jun 7 2013 python-2.7 -> /var/lib/openshift/519017e25973ca1ead00035b/python