You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
797 B

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# from app import settings
# from deployer.node import Node
from deployer.utils import esc1
from app.deploy.debian import Debian
from app import settings
class DjangoDeployment(Debian):
def run_management_command(self, command):
""" Run Django management command in virtualenv. """
self._virtualenv('./manage.py %s' % esc1(command))
def django_shell(self):
""" Open interactive Django shell. """
self.run_management_command('shell')
def python_packages_install(self):
""" Run Django management command in virtualenv. """
# Activate the virtualenv.
self._virtualenv('pip install --upgrade pip && pip install -r %(PROJECT_DIR)s/requirements.txt --upgrade' % settings.__dict__)