Mercurial > p > roundup > code
comparison roundup/configuration.py @ 8300:b99e76e76496
Make native date and number elements configurable
Now for Number() and Integer() properties the browser-native number
format can be configured with the use_browser_number_input config item
in seciont [web]. The default is 'yes'. For Date() properties the config
item is use_browser_date_input (also in section [web]) but the default
is 'no'.
In addition when defining Date() properties, these now have a parameter
'display_time' which defaults to 'yes' and a 'format' parameter which
defaults to None. These set defaults for the field() method of the
DateHTMLProperty which have the same parameters (but the display_time
parameter of field() takes a boolean, not 'yes'/'no').
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Wed, 19 Feb 2025 12:38:06 +0100 |
| parents | 6bd11a73f2ed |
| children | 7ff47307b4b1 |
comparison
equal
deleted
inserted
replaced
| 8299:43899d99fc4d | 8300:b99e76e76496 |
|---|---|
| 1457 "are less than 32 chars, the application will exit. Removing\n" | 1457 "are less than 32 chars, the application will exit. Removing\n" |
| 1458 "a secret from this list invalidates all JWTs signed with\n" | 1458 "a secret from this list invalidates all JWTs signed with\n" |
| 1459 "the secret. JWT support is experimental and disabled by\n" | 1459 "the secret. JWT support is experimental and disabled by\n" |
| 1460 "default. The secrets must be persistent across\n" | 1460 "default. The secrets must be persistent across\n" |
| 1461 "application restarts.\n"), | 1461 "application restarts.\n"), |
| 1462 (BooleanOption, "use_browser_date_input", "no", | |
| 1463 "HTML input elements for Date properties: This determines\n" | |
| 1464 "if we use the input type 'datetime-local' (or 'date') for\n" | |
| 1465 "date input fields. If the option is turned off (the default),\n" | |
| 1466 "the type is set to 'text'. Since the widgets generated by\n" | |
| 1467 "browsers determine the date format from the language\n" | |
| 1468 "setting (it is currently not possible to force the\n" | |
| 1469 "international date format server-side) and some browsers\n" | |
| 1470 "ignore the date format set by the operating system, the\n" | |
| 1471 "default is 'no'."), | |
| 1472 (BooleanOption, "use_browser_number_input", "yes", | |
| 1473 "HTML input elements for Number properties: This determines\n" | |
| 1474 "if we use the input type 'number' for Number (and Integer)\n" | |
| 1475 "properties. If set to 'no' we use input type 'text'."), | |
| 1462 )), | 1476 )), |
| 1463 ("rdbms", ( | 1477 ("rdbms", ( |
| 1464 (DatabaseBackend, 'backend', NODEFAULT, | 1478 (DatabaseBackend, 'backend', NODEFAULT, |
| 1465 "Database backend."), | 1479 "Database backend."), |
| 1466 (BooleanOption, "debug_filter", "no", | 1480 (BooleanOption, "debug_filter", "no", |
