Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(213)

Delta Between Two Patch Sets: README

Issue 547950046: flask-tryton: Add filters for date and number formating
Left Patch Set: Update to tip and fix comments Created 3 years, 10 months ago
Right Patch Set: Remove trailing space Created 3 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « CHANGELOG ('k') | flask_tryton.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 Flask-Tryton 1 Flask-Tryton
2 ============ 2 ============
3 3
4 Adds Tryton support to Flask application. 4 Adds Tryton support to Flask application.
5 5
6 By default transactions are readonly except for PUT, POST, DELETE and PATCH 6 By default transactions are readonly except for PUT, POST, DELETE and PATCH
7 request methods. 7 request methods.
8 It provides also 2 routing converters `record` and `records`. 8 It provides also 2 routing converters `record` and `records`.
9 9
10 Setting the `configure_jinja` flag adds the following filters on jinja 10 Setting the `configure_jinja` flag adds the following filters on jinja
11 templates: `numberformat`, `dateformat`, `currencyformat` and 11 templates: `numberformat`, `dateformat`, `currencyformat` and
ced 2020/05/07 08:18:06 trailing space.
12 `timedeltaformat`. The filters apply the same formatting as Tryton reports. 12 `timedeltaformat`. The filters apply the same formatting as Tryton reports.
13 13
14 Nutshell 14 Nutshell
15 -------- 15 --------
16 16
17 >>> from flask import Flask 17 >>> from flask import Flask
18 >>> from flask_tryton import Tryton 18 >>> from flask_tryton import Tryton
19 >>> app = Flask(__name__) 19 >>> app = Flask(__name__)
20 >>> app.config['TRYTON_DATABASE'] = 'test' 20 >>> app.config['TRYTON_DATABASE'] = 'test'
21 >>> tryton = Tryton(app, configure_jinja=True) 21 >>> tryton = Tryton(app, configure_jinja=True)
(...skipping 18 matching lines...) Expand all
40 40
41 There are three configuration options available: 41 There are three configuration options available:
42 42
43 * `TRYTON_DATABASE`: the Tryton's database to connect. 43 * `TRYTON_DATABASE`: the Tryton's database to connect.
44 * `TRYTON_USER`: the Tryton user id to use, by default `0` (aka `root`). 44 * `TRYTON_USER`: the Tryton user id to use, by default `0` (aka `root`).
45 * `TRYTON_CONFIG`: the optional path to the Tryton's configuration. 45 * `TRYTON_CONFIG`: the optional path to the Tryton's configuration.
46 46
47 To report issues please visit the `flask_tryton bugtracker`_. 47 To report issues please visit the `flask_tryton bugtracker`_.
48 48
49 .. _flask_tryton bugtracker: http://flask-tryton.b2ck.com/ 49 .. _flask_tryton bugtracker: http://flask-tryton.b2ck.com/
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b