def fullSvi():
  svi = dynamiqueIvr("svi.json")
  return svi.get()
Beispiel #2
0
def make_response(step=None):
    # Creation d'une reponse.
    json_loader = dynamiqueIvr(stringJson=session['ivr'])
    if step is None:
        step = json_loader.getParams()['begin']
    return json_loader.getParamAndStep(step, True, 'ivr/')
Beispiel #3
0
from flask import Flask
from pyIvr.ext.flask.baseFlask import baseFlask
from pyIvr import render
from pyIvr import dynamiqueIvr

app = Flask(__name__)

blog = dynamiqueIvr("blog.json")

@app.route("/")
@app.route("/<step>")
@render('xhtml','1.0')
def home(step=None):
  if step is None:
    return blog.get()
  else:
    return blog.getParamAndStep(step)
	
app.run(host='0.0.0.0', debug=True)
from flask import Flask

from pyIvr import render
from pyIvr import dynamiqueIvr

svi = dynamiqueIvr("svi.json")

# from pyIvr.ext.flask.baseFlask import baseFlask

app = Flask(__name__)


@app.route("/web/<step>")
@app.route("/web/")
@render('xhtml', '1.0')
def step_by_step_web_svi(step=None):
    if step is None:
        step = svi.getParams()['begin']
    return {"params": {"begin": step}, "svi": svi.getStep(step, True, "web/")}


@app.route("/svi/<step>")
@app.route("/svi/")
@render('vxml', '2.0')
def step_by_step_svi(step=None):
    if step is None:
        step = svi.getParams()['begin']
    return {"params": {"begin": step}, "svi": svi.getStep(step, True, "svi/")}


@app.route("/full/")
Beispiel #5
0
from flask import Blueprint
from pyIvr import dynamiqueIvr
from pyIvr import render

ivrBlueprint = Blueprint('ivr', __name__)
jsonLoader = dynamiqueIvr("svi.json")

@ivrBlueprint.route("/ivr/")
@ivrBlueprint.route("/ivr/<step>")
@render('vxml','2.0')
def ivr(step=None):
  if step is None:
    step = jsonLoader.getParams()['begin']
  
  return jsonLoader.getParamAndStep(step,True,'ivr/')