Excerpts from Don Zickus's message of 2017-05-10 17:16 -04:00:
So I am guessing to convert the webpages to Flask, one has to go to
each
file (CSV_import_export.py for example) and convert it to use Flask
decorators (@app.route("...") ) and then use Flask templates instead of the
kid files???
That is quite the work...
Am I on the right track? If so, is it possible to go one page at a time or
is it everything at once?
It is a lot of work, yes. Especially if you are talking about any page
which uses TurboGears widgets (the widgets have to be rewritten as
client-side Backbone widgets first).
You don't have to do a whole file at a time though -- just one request
handler. In CherryPy the request handlers are the @expose'd methods on
the controller objects (for example CSV.csv_import method). You would
replace that with a Flask request handler (the functions decorated with
@app.route).
What you can't do is port half of a request handler and mix-and-match
CherryPy-related calls (that includes anything that is a TG widget) with
Flask-related calls, as you discovered in your original post.
--
Dan Callaghan <dcallagh(a)redhat.com>
Senior Software Engineer, Products & Technologies Operations
Red Hat