In meiner deb postinst Datei:Kann Django collectstatic alte Dateien überschreiben?
PYTHON=/usr/bin/python
PYTHON_VERSION=`$PYTHON -c 'import sys; print sys.version[:3]'`
SITE_PACKAGES=/opt/pkgs/mypackage/lib/python$PYTHON_VERSION/site-packages
export PYTHONPATH=$SITE_PACKAGES
echo "collect static files"
$PYTHON manage.py collectstatic --noinput
When I run 'dpkg -i mypackage.deb' to install the package, no problem.
When I run 'dpkg -i mypackage.deb' to re-install the package, old css files unchanged.
When I changed '$PYTHON manage.py collectstatic --noinput ' to '$PYTHON manage.py collectstatic --noinput -c' and run 'dpkg -i mypackage.deb' to re-install the package, the error is following: OSError: [Errno 2] No such file or directory: '/opt/pkgs/myporject/static'
Jede Idee?
Kann Django collectstatic alte Dateien überschreiben?
Ich bin zuversichtlich, dass es kann. Der Fehler ist wahrscheinlich woanders. Hast du versucht, damit zu experimentieren, ohne 'deb' zu benutzen und zu sehen, was es macht? –