Mercurial > p > roundup > code
comparison roundup/configuration.py @ 7964:791b61ed11c9
issue2551323 - Remove XHTML support
First step: raise error if xhtml used in config.ini. Back end code is
still present to allow an admin to re-enable xhtml as a temporary
measure.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 14 May 2024 20:50:25 -0400 |
| parents | 6aa0525187cd |
| children | 9ba60ddafd2a |
comparison
equal
deleted
inserted
replaced
| 7963:05ce472d372b | 7964:791b61ed11c9 |
|---|---|
| 384 if _val in ("beautifulsoup", "dehtml", "none"): | 384 if _val in ("beautifulsoup", "dehtml", "none"): |
| 385 return _val | 385 return _val |
| 386 else: | 386 else: |
| 387 raise OptionValueError(self, value, self.class_description) | 387 raise OptionValueError(self, value, self.class_description) |
| 388 | 388 |
| 389 | |
| 390 class HtmlVersionOption(Option): | |
| 391 """Accept html4 only for now. Raise error for xhtml which is not | |
| 392 supported in roundup 2.4 and newer.""" | |
| 393 | |
| 394 class_description = "Allowed values: html4" | |
| 395 | |
| 396 def str2value(self, value): | |
| 397 _val = value.lower() | |
| 398 if _val in ("html4"): | |
| 399 return _val | |
| 400 else: | |
| 401 raise OptionValueError(self, value, self.class_description) | |
| 389 | 402 |
| 390 class EmailBodyOption(Option): | 403 class EmailBodyOption(Option): |
| 391 | 404 |
| 392 """When to replace message body or strip quoting: always, never | 405 """When to replace message body or strip quoting: always, never |
| 393 or for new items only""" | 406 or for new items only""" |
| 1081 (Option, "error_messages_to", "user", | 1094 (Option, "error_messages_to", "user", |
| 1082 'Send error message emails to the "dispatcher", "user", \n' | 1095 'Send error message emails to the "dispatcher", "user", \n' |
| 1083 'or "both" (these are the three allowed values).\n' | 1096 'or "both" (these are the three allowed values).\n' |
| 1084 'The dispatcher is configured using the DISPATCHER_EMAIL\n' | 1097 'The dispatcher is configured using the DISPATCHER_EMAIL\n' |
| 1085 ' setting.'), | 1098 ' setting.'), |
| 1086 (Option, "html_version", "html4", | 1099 (HtmlVersionOption, "html_version", "html4", |
| 1087 "This setting should be left at the default value of html4.\n" | 1100 "This setting should be left at the default value of html4.\n" |
| 1088 "Support is ending for xhtml mode.\n" | 1101 "Support for xhtml has been disabled.\n" |
| 1089 "HTML version to generate. The templates are html4 by default.\n" | 1102 "HTML version to generate. The templates are html4 by default."), |
| 1090 "If you wish to make them xhtml, then you'll need to change\n" | |
| 1091 "this setting to 'xhtml' too so all auto-generated HTML\n" | |
| 1092 "is compliant.\n" | |
| 1093 "Allowed values: html4, xhtml"), | |
| 1094 (TimezoneOption, "timezone", TimezoneOption.defaulttz, | 1103 (TimezoneOption, "timezone", TimezoneOption.defaulttz, |
| 1095 "Default timezone offset,\n" | 1104 "Default timezone offset,\n" |
| 1096 "applied when user's timezone is not set.", | 1105 "applied when user's timezone is not set.", |
| 1097 ["DEFAULT_TIMEZONE"]), | 1106 ["DEFAULT_TIMEZONE"]), |
| 1098 (BooleanOption, "instant_registration", "no", | 1107 (BooleanOption, "instant_registration", "no", |
