本文整理汇总了Python中swampdragon.swampdragon_server.run_server函数的典型用法代码示例。如果您正苦于以下问题:Python run_server函数的具体用法?Python run_server怎么用?Python run_server使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了run_server函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
import os
import sys
from swampdragon.swampdragon_server import run_server
os.environ.setdefault('DJANGO_SETTINGS_MODULE','OnlineDating.settings')
print(sys.argv)
run_server(sys.argv[1])
示例2: len
#!/usr/bin/python2.7
import os
import sys
from swampdragon.swampdragon_server import run_server
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pandorabox.settings")
host_port = sys.argv[1] if len(sys.argv) > 1 else None
run_server(host_port=host_port)
示例3: handle
def handle(self, *args, **options):
run_server(host_port=options['host_port'])
示例4: run_server
#!/usr/bin/env python
import os
from swampdragon.swampdragon_server import run_server
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sistema_dietas.settings")
run_server()
'''
#!/usr/bin/env python
import os
import sys
from swampdragon.swampdragon_server import run_server
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "<project>.settings")
host_port = sys.argv[1] if len(sys.argv) > 1 else None
run_server(host_port=host_port)
'''
示例5: handle
def handle(self, *args, **options):
host_port = None
if args:
host_port = args[0]
run_server(host_port=host_port)