与runserver一起运行进程
django_runprocess的Python项目详细描述
Django_运行进程
此应用程序允许您与^{tt1}一起运行外部应用程序$ 命令。这对于运行 无需手动运行sass --watch,sass/less文件。
安装
pip install django_runprocess
配置
将其添加到您的INSTALLED_APPS:
INSTALLED_APPS = ( ... 'runprocess' )
添加要在^{tt5}中执行的命令$ 设置。例如,自动运行sass --watch和 runserver,使用以下命令:
SASS_DIR = os.path.join(STATIC_ROOT, 'sass') CSS_DIR = os.path.join(STATIC_ROOT, 'css') RUNPROCESS_PROCESSES = ( ('sass', '--watch', '%s:%s' % (SASS_DIR, CSS_DIR)), )