Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
changes in interaction with pip.py
# somewhere in WebProject
@task_mehtod
def install_r(self, what=None, options='', restart=True):
"""
Installs pip requirements listed in ``<PIP_REQUIREMENTS_PATH>/<file>.txt`` file
and reloads all apps of the project, if specified.
"""
pip.install_r(what, options)
if restart:
for app in self.apps:
app.restart()
@task_method
def update_r(self, what=None, options='', restart=True):
"""
Updates pip requirements listed in ``<PIP_REQUIREMENTS_PATH>/<file>.txt`` file
and reloads all apps of the project, if specified.
"""
pip.update_r(what, options)
if restart:
for app in self.apps:
app.restart()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment