def run(self):
# Pass information into the Gunicorn process through environ.
# This seems to be how Django's stock runserver do things as well;
# see `django.core.management.commands.runserver.Command.execute`.
if settings.SETTINGS_MODULE:
os.environ['DJANGO_SETTINGS_MODULE'] = settings.SETTINGS_MODULE
self.proc = subprocess.Popen(self.args, universal_newlines=True)
self.proc.wait()
评论列表
文章目录