S
S
semolex2014-04-16 15:07:37
backbone.js
semolex, 2014-04-16 15:07:37

How to use Backbone.js template engine in conjunction with Flask-backend?

Hello!

There was a burning question on the use of Backbone templates (using Underscore.js).
The backend is fully functional, there are ready-made routes, methods, validations, and so on.
But the task is received - Backbone.js templates on the client side.

Can you please tell me how to properly organize the interaction between Flask and Backbone?
Code example:

@app.route('/')
#по этому url у меня должен рендериться шаблон с логин страницей с помощью Backbone 
def index():
    return render_template('index.html')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2014-04-16
@k12th

Backbone knows nothing about templates. There is a primitive templating engine built into underscore, that's true.
And the interaction is organized by exchanging data in JSON.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question