只需使用-U
或--upgrade
选项,以取代原来的包在你的VENV与您的自定义版本:
cd myapp && venv/bin/pip install -U git+https://github.com/jcomeauictx/django-crispy-forms.git
然后在你的要求中.txt替换行
django-crispy-forms==1.4.0
与
git+https://github.com/jcomeauictx/django-crispy-forms.git
,当你推到你的Heroku的情况下,你应该看到类似:
-----> Deleting 1 files matching .slugignore patterns.
-----> Python app detected
-----> Uninstalling stale dependencies
Uninstalling django-crispy-forms-1.4.0:
Successfully uninstalled django-crispy-forms-1.4.0
-----> Installing dependencies with pip
Collecting git+https://github.com/jcomeauictx/django-crispy-forms.git (from -r requirements.txt (line 6))
Cloning https://github.com/jcomeauictx/django-crispy-forms.git to /tmp/pip-AlSPnZ-build
Installing collected packages: django-crispy-forms
Running setup.py install for django-crispy-forms
Successfully installed django-crispy-forms-1.5.0