@task
def adminserver(ctx, port=8001, host='127.0.0.1', pty=True):
 env = 'DJANGO_SETTINGS_MODULE="admin.base.settings"'
 cmd = '{} python manage.py runserver {}:{} --no-init-app --nothreading'.format(env, host, port)
 if settings.SECURE_MODE:
  cmd = cmd.replace('runserver', 'runsslserver')
  cmd += ' --certificate {} --key {}'.format(settings.OSF_SERVER_CERT, settings.OSF_SERVER_KEY)
 ctx.run(cmd, echo=True, pty=pty)

@ task def adminserver ( ctx , port = 8001 , host = '127.0.0.1' , pty = True ) : env = 'DJANGO_SETTINGS_MODULE="admin.base.settings"' cmd = '{} python manage.py runserver {}:{} --no-init-app --nothreading' . format ( env , host , port ) if settings . SECURE_MODE : cmd = cmd . replace ( 'runserver' , 'runsslserver' ) cmd += ' --certificate {} --key {}' . format ( settings . OSF_SERVER_CERT , settings . OSF_SERVER_KEY ) ctx . run ( cmd , echo = True , pty = pty )
run the admin server .