Ejemplo n.º 1
0
def printer():
    form = CreateForm(request.form)
    if request.method == 'POST' and form.validate():
        from project.models.Printer import Printer
        printer = Printer()
        printer.show_string(form.text.data)
        return render_template('printer/index.html')
    return render_template('printer/print.html', form=form)
Ejemplo n.º 2
0
def printer():
    form = CreateForm(request.form)
    if request.method == 'POST' and form.validate():
        from project.models.Printer import Printer
        printer = Printer()
        printer.show_string(form.text.data)
        return render_template('printer/index.html')
    return render_template('printer/print.html', form=form)
Ejemplo n.º 3
0
def printer():
    form = CreateForm(request.form)
    print form.errors
    if request.method == 'POST':
        text = request.form['text']
        if form.validate():
            from project.models.Printer import Printer
            printer = Printer()
            printer.show_string(form.text.data)
            #tutaj można coś z tymi danymi zrobić, np dodać je do bazki :)
            return render_template('printer/index.html')
    return render_template('printer/print.html', form=form)
Ejemplo n.º 4
0
def printer():
  if request.method == 'POST':
    from project.models.Printer import Printer
    printer = Printer()
    message = printer.show_string(request.forms.get('text'))
    return template('printer/index', message = message)
  return template('printer/print', message = '')
Ejemplo n.º 5
0
def printer():
    if request.method == 'POST':
        from project.models.Printer import Printer
        printer = Printer()
        message = printer.show_string(request.forms.get('text'))
        return template('printer/index', message=message)
    return template('printer/print', message='')