From e83bb7af2949aed12d3e36b98264579450e5b844 Mon Sep 17 00:00:00 2001 From: gi0baro Date: Fri, 15 Nov 2013 15:22:20 +0100 Subject: [PATCH 001/302] Add response.static_version to URL() --- gluon/html.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gluon/html.py b/gluon/html.py index feac9423..dd925b0d 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -290,6 +290,14 @@ def URL( # if the url gets a static resource, don't force extention if controller == 'static': extension = None + # add static version to url + from globals import current + if hasattr(current, 'response'): + response = current.response + if response: + if response.static_version and response.static_version_urls: + args = [function] + args + function = '_'+str(response.static_version) if '.' in function: function, extension = function.rsplit('.', 1) From 2bf1f5396f7983e0561ffbc498cbf837cbed3143 Mon Sep 17 00:00:00 2001 From: gi0baro Date: Mon, 18 Nov 2013 01:12:37 +0100 Subject: [PATCH 002/302] Removed pedant if check in URL() --- gluon/html.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gluon/html.py b/gluon/html.py index dd925b0d..954a8825 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -294,10 +294,9 @@ def URL( from globals import current if hasattr(current, 'response'): response = current.response - if response: - if response.static_version and response.static_version_urls: - args = [function] + args - function = '_'+str(response.static_version) + if response.static_version and response.static_version_urls: + args = [function] + args + function = '_'+str(response.static_version) if '.' in function: function, extension = function.rsplit('.', 1) From b673593683afb84708156e1b43c6c268fc9f457e Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Mon, 2 Dec 2013 21:33:34 +0100 Subject: [PATCH 003/302] add translitcodec to contrib --- gluon/contrib/translitcodec/AUTHORS | 9 + gluon/contrib/translitcodec/CHANGES | 31 + gluon/contrib/translitcodec/LICENSE | 20 + gluon/contrib/translitcodec/README | 44 + gluon/contrib/translitcodec/__init__.py | 2443 +++++++++++++++++++++++ 5 files changed, 2547 insertions(+) create mode 100644 gluon/contrib/translitcodec/AUTHORS create mode 100644 gluon/contrib/translitcodec/CHANGES create mode 100644 gluon/contrib/translitcodec/LICENSE create mode 100644 gluon/contrib/translitcodec/README create mode 100644 gluon/contrib/translitcodec/__init__.py diff --git a/gluon/contrib/translitcodec/AUTHORS b/gluon/contrib/translitcodec/AUTHORS new file mode 100644 index 00000000..b7e8bf40 --- /dev/null +++ b/gluon/contrib/translitcodec/AUTHORS @@ -0,0 +1,9 @@ +translitcodec was originally written by Jason Kirtland in 2008. + +Contributors are: + +- Jason Kirtland +- Craig Dennis + +The translitcodec source distribution includes the 'transtab' package +by Markus Kuhn . diff --git a/gluon/contrib/translitcodec/CHANGES b/gluon/contrib/translitcodec/CHANGES new file mode 100644 index 00000000..7bfd355c --- /dev/null +++ b/gluon/contrib/translitcodec/CHANGES @@ -0,0 +1,31 @@ +===================== +translitcodec Changes +===================== + +0.3 +--- + +Released on February 14, 2011 + +- Fixes to the transtab table rebuilding tool. + +- Added translitcodec.__version__ + +0.2 +--- + +Released on January 27, 2011 + +- Resolves issue of "TypeError: character mapping must return integer, + None or unicode" when a blank value (eg: \N{ZERO WIDTH SPACE} \u200B) + was encoded. Unicode blanks are now returned. + +- Characters in the ASCII range are no longer included in the translation + tables. + +0.1 +--- + +Released on December 28, 2008 + +- Initial packaged release. diff --git a/gluon/contrib/translitcodec/LICENSE b/gluon/contrib/translitcodec/LICENSE new file mode 100644 index 00000000..90e9ea6e --- /dev/null +++ b/gluon/contrib/translitcodec/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2008 Jason Kirtland + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/gluon/contrib/translitcodec/README b/gluon/contrib/translitcodec/README new file mode 100644 index 00000000..12e1fdd2 --- /dev/null +++ b/gluon/contrib/translitcodec/README @@ -0,0 +1,44 @@ +-*- coding: utf-8 -*- + +Unicode to 8-bit charset transliteration codec. + +This package contains codecs for transliterating ISO 10646 texts into +best-effort representations using smaller coded character sets (ASCII, +ISO 8859, etc.). The translation tables used by the codecs are from +the ``transtab`` collection by Markus Kuhn. + +Three types of transliterating codecs are provided: + + "long", using as many characters as needed to make a natural + replacement. For example, \u00e4 LATIN SMALL LETTER A WITH + DIAERESIS ``ä`` will be replaced with ``ae``. + + "short", using the minimum number of characters to make a + replacement. For example, \u00e4 LATIN SMALL LETTER A WITH + DIAERESIS ``ä`` will be replaced with ``a``. + + "one", only performing single character replacements. Characters + that can not be transliterated with a single character are passed + through unchanged. For example, \u2639 WHITE FROWNING FACE ``☹`` + will be passed through unchanged. + +Using the codecs is simple:: + + >>> import translitcodec + >>> u'fácil € ☺'.encode('translit/long') + u'facil EUR :-)' + >>> u'fácil € ☺'.encode('translit/short') + u'facil E :-)' + +The codecs return Unicode by default. To receive a bytestring back, +either chain the output of encode() to another codec, or append the +name of the desired byte encoding to the codec name:: + + >>> u'fácil € ☺'.encode('translit/one').encode('ascii', 'replace') + 'facil E ?' + >>> u'fácil € ☺'.encode('translit/one/ascii', 'replace') + 'facil E ?' + +The package also supplies a 'transliterate' codec, an alias for +'translit/long'. + diff --git a/gluon/contrib/translitcodec/__init__.py b/gluon/contrib/translitcodec/__init__.py new file mode 100644 index 00000000..48064d91 --- /dev/null +++ b/gluon/contrib/translitcodec/__init__.py @@ -0,0 +1,2443 @@ +# -*- coding: utf-8 -*- +"""Unicode to 8-bit charset transliteration codec. + +This package contains codecs for transliterating ISO 10646 texts into +best-effort representations using smaller coded character sets (ASCII, +ISO 8859, etc.). The translation tables used by the codecs are from +the ``transtab`` collection by Markus Kuhn. + +:copyright: the translitcodec authors and developers, see AUTHORS. +:license: MIT, see LICENSE for more details. + +""" +import codecs +import sys +import unicodedata + + +__version_info__ = (0, 3) +__version__ = '.'.join(str(_) for _ in __version_info__) + + +def long_encode(input, errors='strict'): + """Transliterate to 8 bit using as many letters as needed. + + For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will + be replaced with ``ae``. + + """ + if not isinstance(input, unicode): + input = unicode(input, sys.getdefaultencoding(), errors) + length = len(input) + input = unicodedata.normalize('NFKC', input) + return input.translate(long_table), length + + +def short_encode(input, errors='strict'): + """Transliterate to 8 bit using as few letters as possible. + + For example, \u00e4 LATIN SMALL LETTER A WITH DIAERESIS ``ä`` will + be replaced with ``a``. + + """ + if not isinstance(input, unicode): + input = unicode(input, sys.getdefaultencoding(), errors) + length = len(input) + input = unicodedata.normalize('NFKC', input) + return input.translate(short_table), length + + +def single_encode(input, errors='strict'): + """Transliterate to 8 bit using only single letter replacements. + + For example, \u2639 WHITE FROWNING FACE ``☹`` will be passed + through unchanged. + + """ + if not isinstance(input, unicode): + input = unicode(input, sys.getdefaultencoding(), errors) + length = len(input) + input = unicodedata.normalize('NFKC', input) + return input.translate(single_table), length + + +def no_decode(input, errors='strict'): + raise TypeError("transliterating codec does not support decode.") + + +def _double_encoding_factory(encoder, byte_encoder, byte_encoding): + """Send the transliterated output to another codec.""" + def dbl_encode(input, errors='strict'): + uni, length = encoder(input, errors) + return byte_encoder(uni, errors)[0], length + dbl_encode.__name__ = '%s_%s' % (encoder.__name__, byte_encoding) + return dbl_encode + + +def trans_search(encoding): + """Lookup transliterating codecs.""" + if encoding == 'transliterate': + return codecs.CodecInfo(long_encode, no_decode) + + # translit/long/utf8 + # translit/one + # translit/short/ascii + + if encoding.startswith('translit/'): + parts = encoding.split('/') + if parts[1] == 'long': + encoder = long_encode + elif parts[1] == 'short': + encoder = short_encode + elif parts[1] == 'one': + encoder = single_encode + else: + return None + + if len(parts) == 2: + pass + elif len(parts) == 3: + byte_enc = parts[2] + byte_encoder = codecs.lookup(byte_enc).encode + encoder = _double_encoding_factory(encoder, byte_encoder, byte_enc) + else: + return None + return codecs.CodecInfo(encoder, no_decode) + return None + +codecs.register(trans_search) + +### Code below is generated by update_table.py; do not edit. +### > + +long_table = { + 160: u' ', + 161: u'!', + 162: u'c', + 163: u'GBP', + 165: u'Y', + 166: u'|', + 167: u'S', + 168: u'"', + 169: u'(c)', + 170: u'a', + 171: u'<<', + 172: u'-', + 173: u'-', + 174: u'(R)', + 175: u'-', + 176: u' ', + 177: u'+/-', + 178: u'^2', + 179: u'^3', + 180: u"'", + 181: u'\u03bc', + 182: u'P', + 183: u'.', + 184: u',', + 185: u'^1', + 186: u'o', + 187: u'>>', + 188: u' 1/4', + 189: u' 1/2', + 190: u' 3/4', + 191: u'?', + 192: u'A', + 193: u'A', + 194: u'A', + 195: u'A', + 196: u'Ae', + 197: u'Aa', + 198: u'AE', + 199: u'C', + 200: u'E', + 201: u'E', + 202: u'E', + 203: u'E', + 204: u'I', + 205: u'I', + 206: u'I', + 207: u'I', + 208: u'D', + 209: u'N', + 210: u'O', + 211: u'O', + 212: u'O', + 213: u'O', + 214: u'Oe', + 215: u'x', + 216: u'O', + 217: u'U', + 218: u'U', + 219: u'U', + 220: u'Ue', + 221: u'Y', + 222: u'Th', + 223: u'ss', + 224: u'a', + 225: u'a', + 226: u'a', + 227: u'a', + 228: u'ae', + 229: u'aa', + 230: u'ae', + 231: u'c', + 232: u'e', + 233: u'e', + 234: u'e', + 235: u'e', + 236: u'i', + 237: u'i', + 238: u'i', + 239: u'i', + 240: u'd', + 241: u'n', + 242: u'o', + 243: u'o', + 244: u'o', + 245: u'o', + 246: u'oe', + 247: u':', + 248: u'o', + 249: u'u', + 250: u'u', + 251: u'u', + 252: u'ue', + 253: u'y', + 254: u'th', + 255: u'y', + 256: u'A', + 257: u'a', + 258: u'A', + 259: u'a', + 260: u'A', + 261: u'a', + 262: u'C', + 263: u'c', + 264: u'Ch', + 265: u'ch', + 266: u'C', + 267: u'c', + 268: u'C', + 269: u'c', + 270: u'D', + 271: u'd', + 272: u'D', + 273: u'd', + 274: u'E', + 275: u'e', + 276: u'E', + 277: u'e', + 278: u'E', + 279: u'e', + 280: u'E', + 281: u'e', + 282: u'E', + 283: u'e', + 284: u'Gh', + 285: u'gh', + 286: u'G', + 287: u'g', + 288: u'G', + 289: u'g', + 290: u'G', + 291: u'g', + 292: u'Hh', + 293: u'hh', + 294: u'H', + 295: u'h', + 296: u'I', + 297: u'i', + 298: u'I', + 299: u'i', + 300: u'I', + 301: u'i', + 302: u'I', + 303: u'i', + 304: u'I', + 305: u'i', + 306: u'IJ', + 307: u'ij', + 308: u'Jh', + 309: u'jh', + 310: u'K', + 311: u'k', + 312: u'k', + 313: u'L', + 314: u'l', + 315: u'L', + 316: u'l', + 317: u'L', + 318: u'l', + 319: u'L\xb7', + 320: u'l\xb7', + 321: u'L', + 322: u'l', + 323: u'N', + 324: u'n', + 325: u'N', + 326: u'n', + 327: u'N', + 328: u'n', + 329: u"'n", + 330: u'NG', + 331: u'ng', + 332: u'O', + 333: u'o', + 334: u'O', + 335: u'o', + 336: u'O', + 337: u'o', + 338: u'OE', + 339: u'oe', + 340: u'R', + 341: u'r', + 342: u'R', + 343: u'r', + 344: u'R', + 345: u'r', + 346: u'S', + 347: u's', + 348: u'Sh', + 349: u'sh', + 350: u'S', + 351: u's', + 352: u'S', + 353: u's', + 354: u'T', + 355: u't', + 356: u'T', + 357: u't', + 358: u'T', + 359: u't', + 360: u'U', + 361: u'u', + 362: u'U', + 363: u'u', + 364: u'U', + 365: u'u', + 366: u'U', + 367: u'u', + 368: u'U', + 369: u'u', + 370: u'U', + 371: u'u', + 372: u'W', + 373: u'w', + 374: u'Y', + 375: u'y', + 376: u'Y', + 377: u'Z', + 378: u'z', + 379: u'Z', + 380: u'z', + 381: u'Z', + 382: u'z', + 383: u's', + 402: u'f', + 536: u'\u015e', + 537: u'\u015f', + 538: u'\u0162', + 539: u'\u0163', + 697: u'\u2032', + 699: u'\u2018', + 700: u'\u2019', + 701: u'\u201b', + 710: u'^', + 712: u"'", + 713: u'\xaf', + 716: u',', + 720: u':', + 730: u'\xb0', + 732: u'~', + 733: u'"', + 884: u"'", + 885: u',', + 894: u';', + 7682: u'B', + 7683: u'b', + 7690: u'D', + 7691: u'd', + 7710: u'F', + 7711: u'f', + 7744: u'M', + 7745: u'm', + 7766: u'P', + 7767: u'p', + 7776: u'S', + 7777: u's', + 7786: u'T', + 7787: u't', + 7808: u'W', + 7809: u'w', + 7810: u'W', + 7811: u'w', + 7812: u'W', + 7813: u'w', + 7922: u'Y', + 7923: u'y', + 8192: u' ', + 8193: u' ', + 8194: u' ', + 8195: u' ', + 8196: u' ', + 8197: u' ', + 8198: u' ', + 8199: u' ', + 8200: u' ', + 8201: u' ', + 8202: u'', + 8203: u'', + 8204: u'', + 8205: u'', + 8206: u'', + 8207: u'', + 8208: u'-', + 8209: u'-', + 8210: u'-', + 8211: u'-', + 8212: u'--', + 8213: u'--', + 8214: u'||', + 8215: u'_', + 8216: u"'", + 8217: u"'", + 8218: u"'", + 8219: u"'", + 8220: u'"', + 8221: u'"', + 8222: u'"', + 8223: u'"', + 8224: u'+', + 8225: u'++', + 8226: u'o', + 8227: u'>', + 8228: u'.', + 8229: u'..', + 8230: u'...', + 8231: u'-', + 8234: u'', + 8235: u'', + 8236: u'', + 8237: u'', + 8238: u'', + 8239: u' ', + 8240: u' 0/00', + 8242: u"'", + 8243: u'"', + 8244: u"'''", + 8245: u'`', + 8246: u'``', + 8247: u'```', + 8249: u'<', + 8250: u'>', + 8252: u'!!', + 8254: u'-', + 8259: u'-', + 8260: u'/', + 8264: u'?!', + 8265: u'!?', + 8266: u'7', + 8304: u'^0', + 8308: u'^4', + 8309: u'^5', + 8310: u'^6', + 8311: u'^7', + 8312: u'^8', + 8313: u'^9', + 8314: u'^+', + 8315: u'^-', + 8316: u'^=', + 8317: u'^(', + 8318: u'^)', + 8319: u'^n', + 8320: u'_0', + 8321: u'_1', + 8322: u'_2', + 8323: u'_3', + 8324: u'_4', + 8325: u'_5', + 8326: u'_6', + 8327: u'_7', + 8328: u'_8', + 8329: u'_9', + 8330: u'_+', + 8331: u'_-', + 8332: u'_=', + 8333: u'_(', + 8334: u'_)', + 8364: u'EUR', + 8448: u'a/c', + 8449: u'a/s', + 8451: u'\xb0C', + 8453: u'c/o', + 8454: u'c/u', + 8457: u'\xb0F', + 8467: u'l', + 8470: u'N\xba', + 8471: u'(P)', + 8480: u'[SM]', + 8481: u'TEL', + 8482: u'[TM]', + 8486: u'\u03a9', + 8490: u'K', + 8491: u'\xc5', + 8494: u'e', + 8531: u' 1/3', + 8532: u' 2/3', + 8533: u' 1/5', + 8534: u' 2/5', + 8535: u' 3/5', + 8536: u' 4/5', + 8537: u' 1/6', + 8538: u' 5/6', + 8539: u' 1/8', + 8540: u' 3/8', + 8541: u' 5/8', + 8542: u' 7/8', + 8543: u' 1/', + 8544: u'I', + 8545: u'II', + 8546: u'III', + 8547: u'IV', + 8548: u'V', + 8549: u'VI', + 8550: u'VII', + 8551: u'VIII', + 8552: u'IX', + 8553: u'X', + 8554: u'XI', + 8555: u'XII', + 8556: u'L', + 8557: u'C', + 8558: u'D', + 8559: u'M', + 8560: u'i', + 8561: u'ii', + 8562: u'iii', + 8563: u'iv', + 8564: u'v', + 8565: u'vi', + 8566: u'vii', + 8567: u'viii', + 8568: u'ix', + 8569: u'x', + 8570: u'xi', + 8571: u'xii', + 8572: u'l', + 8573: u'c', + 8574: u'd', + 8575: u'm', + 8592: u'<-', + 8593: u'^', + 8594: u'->', + 8595: u'v', + 8596: u'<->', + 8656: u'<=', + 8658: u'=>', + 8660: u'<=>', + 8722: u'\u2013', + 8725: u'/', + 8726: u'\\', + 8727: u'*', + 8728: u'o', + 8729: u'\xb7', + 8734: u'inf', + 8739: u'|', + 8741: u'||', + 8758: u':', + 8764: u'~', + 8800: u'/=', + 8801: u'=', + 8804: u'<=', + 8805: u'>=', + 8810: u'<<', + 8811: u'>>', + 8853: u'(+)', + 8854: u'(-)', + 8855: u'(x)', + 8856: u'(/)', + 8866: u'|-', + 8867: u'-|', + 8870: u'|-', + 8871: u'|=', + 8872: u'|=', + 8873: u'||-', + 8901: u'\xb7', + 8902: u'*', + 8917: u'#', + 8920: u'<<<', + 8921: u'>>>', + 8943: u'...', + 9001: u'<', + 9002: u'>', + 9216: u'NUL', + 9217: u'SOH', + 9218: u'STX', + 9219: u'ETX', + 9220: u'EOT', + 9221: u'ENQ', + 9222: u'ACK', + 9223: u'BEL', + 9224: u'BS', + 9225: u'HT', + 9226: u'LF', + 9227: u'VT', + 9228: u'FF', + 9229: u'CR', + 9230: u'SO', + 9231: u'SI', + 9232: u'DLE', + 9233: u'DC1', + 9234: u'DC2', + 9235: u'DC3', + 9236: u'DC4', + 9237: u'NAK', + 9238: u'SYN', + 9239: u'ETB', + 9240: u'CAN', + 9241: u'EM', + 9242: u'SUB', + 9243: u'ESC', + 9244: u'FS', + 9245: u'GS', + 9246: u'RS', + 9247: u'US', + 9248: u'SP', + 9249: u'DEL', + 9251: u'_', + 9252: u'NL', + 9253: u'///', + 9254: u'?', + 9312: u'(1)', + 9313: u'(2)', + 9314: u'(3)', + 9315: u'(4)', + 9316: u'(5)', + 9317: u'(6)', + 9318: u'(7)', + 9319: u'(8)', + 9320: u'(9)', + 9321: u'(10)', + 9322: u'(11)', + 9323: u'(12)', + 9324: u'(13)', + 9325: u'(14)', + 9326: u'(15)', + 9327: u'(16)', + 9328: u'(17)', + 9329: u'(18)', + 9330: u'(19)', + 9331: u'(20)', + 9332: u'(1)', + 9333: u'(2)', + 9334: u'(3)', + 9335: u'(4)', + 9336: u'(5)', + 9337: u'(6)', + 9338: u'(7)', + 9339: u'(8)', + 9340: u'(9)', + 9341: u'(10)', + 9342: u'(11)', + 9343: u'(12)', + 9344: u'(13)', + 9345: u'(14)', + 9346: u'(15)', + 9347: u'(16)', + 9348: u'(17)', + 9349: u'(18)', + 9350: u'(19)', + 9351: u'(20)', + 9352: u'1.', + 9353: u'2.', + 9354: u'3.', + 9355: u'4.', + 9356: u'5.', + 9357: u'6.', + 9358: u'7.', + 9359: u'8.', + 9360: u'9.', + 9361: u'10.', + 9362: u'11.', + 9363: u'12.', + 9364: u'13.', + 9365: u'14.', + 9366: u'15.', + 9367: u'16.', + 9368: u'17.', + 9369: u'18.', + 9370: u'19.', + 9371: u'20.', + 9372: u'(a)', + 9373: u'(b)', + 9374: u'(c)', + 9375: u'(d)', + 9376: u'(e)', + 9377: u'(f)', + 9378: u'(g)', + 9379: u'(h)', + 9380: u'(i)', + 9381: u'(j)', + 9382: u'(k)', + 9383: u'(l)', + 9384: u'(m)', + 9385: u'(n)', + 9386: u'(o)', + 9387: u'(p)', + 9388: u'(q)', + 9389: u'(r)', + 9390: u'(s)', + 9391: u'(t)', + 9392: u'(u)', + 9393: u'(v)', + 9394: u'(w)', + 9395: u'(x)', + 9396: u'(y)', + 9397: u'(z)', + 9398: u'(A)', + 9399: u'(B)', + 9400: u'(C)', + 9401: u'(D)', + 9402: u'(E)', + 9403: u'(F)', + 9404: u'(G)', + 9405: u'(H)', + 9406: u'(I)', + 9407: u'(J)', + 9408: u'(K)', + 9409: u'(L)', + 9410: u'(M)', + 9411: u'(N)', + 9412: u'(O)', + 9413: u'(P)', + 9414: u'(Q)', + 9415: u'(R)', + 9416: u'(S)', + 9417: u'(T)', + 9418: u'(U)', + 9419: u'(V)', + 9420: u'(W)', + 9421: u'(X)', + 9422: u'(Y)', + 9423: u'(Z)', + 9424: u'(a)', + 9425: u'(b)', + 9426: u'(c)', + 9427: u'(d)', + 9428: u'(e)', + 9429: u'(f)', + 9430: u'(g)', + 9431: u'(h)', + 9432: u'(i)', + 9433: u'(j)', + 9434: u'(k)', + 9435: u'(l)', + 9436: u'(m)', + 9437: u'(n)', + 9438: u'(o)', + 9439: u'(p)', + 9440: u'(q)', + 9441: u'(r)', + 9442: u'(s)', + 9443: u'(t)', + 9444: u'(u)', + 9445: u'(v)', + 9446: u'(w)', + 9447: u'(x)', + 9448: u'(y)', + 9449: u'(z)', + 9450: u'(0)', + 9472: u'-', + 9473: u'=', + 9474: u'|', + 9475: u'|', + 9476: u'-', + 9477: u'=', + 9478: u'|', + 9479: u'|', + 9480: u'-', + 9481: u'=', + 9482: u'|', + 9483: u'|', + 9484: u'+', + 9485: u'+', + 9486: u'+', + 9487: u'+', + 9488: u'+', + 9489: u'+', + 9490: u'+', + 9491: u'+', + 9492: u'+', + 9493: u'+', + 9494: u'+', + 9495: u'+', + 9496: u'+', + 9497: u'+', + 9498: u'+', + 9499: u'+', + 9500: u'+', + 9501: u'+', + 9502: u'+', + 9503: u'+', + 9504: u'+', + 9505: u'+', + 9506: u'+', + 9507: u'+', + 9508: u'+', + 9509: u'+', + 9510: u'+', + 9511: u'+', + 9512: u'+', + 9513: u'+', + 9514: u'+', + 9515: u'+', + 9516: u'+', + 9517: u'+', + 9518: u'+', + 9519: u'+', + 9520: u'+', + 9521: u'+', + 9522: u'+', + 9523: u'+', + 9524: u'+', + 9525: u'+', + 9526: u'+', + 9527: u'+', + 9528: u'+', + 9529: u'+', + 9530: u'+', + 9531: u'+', + 9532: u'+', + 9533: u'+', + 9534: u'+', + 9535: u'+', + 9536: u'+', + 9537: u'+', + 9538: u'+', + 9539: u'+', + 9540: u'+', + 9541: u'+', + 9542: u'+', + 9543: u'+', + 9544: u'+', + 9545: u'+', + 9546: u'+', + 9547: u'+', + 9548: u'-', + 9549: u'=', + 9550: u'|', + 9551: u'|', + 9552: u'=', + 9553: u'|', + 9554: u'+', + 9555: u'+', + 9556: u'+', + 9557: u'+', + 9558: u'+', + 9559: u'+', + 9560: u'+', + 9561: u'+', + 9562: u'+', + 9563: u'+', + 9564: u'+', + 9565: u'+', + 9566: u'+', + 9567: u'+', + 9568: u'+', + 9569: u'+', + 9570: u'+', + 9571: u'+', + 9572: u'+', + 9573: u'+', + 9574: u'+', + 9575: u'+', + 9576: u'+', + 9577: u'+', + 9578: u'+', + 9579: u'+', + 9580: u'+', + 9581: u'+', + 9582: u'+', + 9583: u'+', + 9584: u'+', + 9585: u'/', + 9586: u'\\', + 9587: u'X', + 9596: u'-', + 9597: u'|', + 9598: u'-', + 9599: u'|', + 9675: u'o', + 9702: u'o', + 9733: u'*', + 9734: u'*', + 9746: u'X', + 9747: u'X', + 9785: u':-(', + 9786: u':-)', + 9787: u'(-:', + 9837: u'b', + 9839: u'#', + 9985: u'%<', + 9986: u'%<', + 9987: u'%<', + 9988: u'%<', + 9996: u'V', + 10003: u'\u221a', + 10004: u'\u221a', + 10005: u'x', + 10006: u'x', + 10007: u'X', + 10008: u'X', + 10009: u'+', + 10010: u'+', + 10011: u'+', + 10012: u'+', + 10013: u'+', + 10014: u'+', + 10015: u'+', + 10016: u'+', + 10017: u'*', + 10018: u'+', + 10019: u'+', + 10020: u'+', + 10021: u'+', + 10022: u'+', + 10023: u'+', + 10025: u'*', + 10026: u'*', + 10027: u'*', + 10028: u'*', + 10029: u'*', + 10030: u'*', + 10031: u'*', + 10032: u'*', + 10033: u'*', + 10034: u'*', + 10035: u'*', + 10036: u'*', + 10037: u'*', + 10038: u'*', + 10039: u'*', + 10040: u'*', + 10041: u'*', + 10042: u'*', + 10043: u'*', + 10044: u'*', + 10045: u'*', + 10046: u'*', + 10047: u'*', + 10048: u'*', + 10049: u'*', + 10050: u'*', + 10051: u'*', + 10052: u'*', + 10053: u'*', + 10054: u'*', + 10055: u'*', + 10056: u'*', + 10057: u'*', + 10058: u'*', + 10059: u'*', + 64256: u'ff', + 64257: u'fi', + 64258: u'fl', + 64259: u'ffi', + 64260: u'ffl', + 64261: u'\u017ft', + 64262: u'st', + 65279: u'', + 65533: u'?', +} + +short_table = { + 160: u' ', + 161: u'!', + 162: u'c', + 163: u'GBP', + 165: u'Y', + 166: u'|', + 167: u'S', + 168: u'"', + 169: u'c', + 170: u'a', + 171: u'<<', + 172: u'-', + 173: u'-', + 174: u'(R)', + 175: u'-', + 176: u' ', + 177: u'+/-', + 178: u'2', + 179: u'3', + 180: u"'", + 181: u'u', + 182: u'P', + 183: u'.', + 184: u',', + 185: u'1', + 186: u'o', + 187: u'>>', + 188: u' 1/4', + 189: u' 1/2', + 190: u' 3/4', + 191: u'?', + 192: u'A', + 193: u'A', + 194: u'A', + 195: u'A', + 196: u'A', + 197: u'A', + 198: u'A', + 199: u'C', + 200: u'E', + 201: u'E', + 202: u'E', + 203: u'E', + 204: u'I', + 205: u'I', + 206: u'I', + 207: u'I', + 208: u'D', + 209: u'N', + 210: u'O', + 211: u'O', + 212: u'O', + 213: u'O', + 214: u'O', + 215: u'x', + 216: u'O', + 217: u'U', + 218: u'U', + 219: u'U', + 220: u'U', + 221: u'Y', + 222: u'Th', + 223: u'\u03b2', + 224: u'a', + 225: u'a', + 226: u'a', + 227: u'a', + 228: u'a', + 229: u'a', + 230: u'a', + 231: u'c', + 232: u'e', + 233: u'e', + 234: u'e', + 235: u'e', + 236: u'i', + 237: u'i', + 238: u'i', + 239: u'i', + 240: u'd', + 241: u'n', + 242: u'o', + 243: u'o', + 244: u'o', + 245: u'o', + 246: u'o', + 247: u':', + 248: u'o', + 249: u'u', + 250: u'u', + 251: u'u', + 252: u'u', + 253: u'y', + 254: u'th', + 255: u'y', + 256: u'A', + 257: u'a', + 258: u'A', + 259: u'a', + 260: u'A', + 261: u'a', + 262: u'C', + 263: u'c', + 264: u'C', + 265: u'c', + 266: u'C', + 267: u'c', + 268: u'C', + 269: u'c', + 270: u'D', + 271: u'd', + 272: u'D', + 273: u'd', + 274: u'E', + 275: u'e', + 276: u'E', + 277: u'e', + 278: u'E', + 279: u'e', + 280: u'E', + 281: u'e', + 282: u'E', + 283: u'e', + 284: u'G', + 285: u'g', + 286: u'G', + 287: u'g', + 288: u'G', + 289: u'g', + 290: u'G', + 291: u'g', + 292: u'H', + 293: u'h', + 294: u'H', + 295: u'h', + 296: u'I', + 297: u'i', + 298: u'I', + 299: u'i', + 300: u'I', + 301: u'i', + 302: u'I', + 303: u'i', + 304: u'I', + 305: u'i', + 306: u'IJ', + 307: u'ij', + 308: u'J', + 309: u'j', + 310: u'K', + 311: u'k', + 312: u'k', + 313: u'L', + 314: u'l', + 315: u'L', + 316: u'l', + 317: u'L', + 318: u'l', + 319: u'L.', + 320: u'l.', + 321: u'L', + 322: u'l', + 323: u'N', + 324: u'n', + 325: u'N', + 326: u'n', + 327: u'N', + 328: u'n', + 329: u"'n", + 330: u'N', + 331: u'n', + 332: u'O', + 333: u'o', + 334: u'O', + 335: u'o', + 336: u'O', + 337: u'o', + 338: u'OE', + 339: u'oe', + 340: u'R', + 341: u'r', + 342: u'R', + 343: u'r', + 344: u'R', + 345: u'r', + 346: u'S', + 347: u's', + 348: u'S', + 349: u's', + 350: u'S', + 351: u's', + 352: u'S', + 353: u's', + 354: u'T', + 355: u't', + 356: u'T', + 357: u't', + 358: u'T', + 359: u't', + 360: u'U', + 361: u'u', + 362: u'U', + 363: u'u', + 364: u'U', + 365: u'u', + 366: u'U', + 367: u'u', + 368: u'U', + 369: u'u', + 370: u'U', + 371: u'u', + 372: u'W', + 373: u'w', + 374: u'Y', + 375: u'y', + 376: u'Y', + 377: u'Z', + 378: u'z', + 379: u'Z', + 380: u'z', + 381: u'Z', + 382: u'z', + 383: u's', + 402: u'f', + 536: u'S', + 537: u's', + 538: u'T', + 539: u't', + 697: u"'", + 699: u'\u2018', + 700: u"'", + 701: u'\u201b', + 710: u'^', + 712: u"'", + 713: u'\xaf', + 716: u',', + 720: u':', + 730: u'\xb0', + 732: u'~', + 733: u'"', + 884: u"'", + 885: u',', + 894: u';', + 7682: u'B', + 7683: u'b', + 7690: u'D', + 7691: u'd', + 7710: u'F', + 7711: u'f', + 7744: u'M', + 7745: u'm', + 7766: u'P', + 7767: u'p', + 7776: u'S', + 7777: u's', + 7786: u'T', + 7787: u't', + 7808: u'W', + 7809: u'w', + 7810: u'W', + 7811: u'w', + 7812: u'W', + 7813: u'w', + 7922: u'Y', + 7923: u'y', + 8192: u' ', + 8193: u' ', + 8194: u' ', + 8195: u' ', + 8196: u' ', + 8197: u' ', + 8198: u' ', + 8199: u' ', + 8200: u' ', + 8201: u' ', + 8202: u'', + 8203: u'', + 8204: u'', + 8205: u'', + 8206: u'', + 8207: u'', + 8208: u'-', + 8209: u'-', + 8210: u'-', + 8211: u'-', + 8212: u'--', + 8213: u'--', + 8214: u'||', + 8215: u'_', + 8216: u"'", + 8217: u"'", + 8218: u"'", + 8219: u"'", + 8220: u'"', + 8221: u'"', + 8222: u'"', + 8223: u'"', + 8224: u'+', + 8225: u'++', + 8226: u'o', + 8227: u'>', + 8228: u'.', + 8229: u'..', + 8230: u'...', + 8231: u'-', + 8234: u'', + 8235: u'', + 8236: u'', + 8237: u'', + 8238: u'', + 8239: u' ', + 8240: u' 0/00', + 8242: u"'", + 8243: u'"', + 8244: u"'''", + 8245: u'`', + 8246: u'``', + 8247: u'```', + 8249: u'<', + 8250: u'>', + 8252: u'!!', + 8254: u'-', + 8259: u'-', + 8260: u'/', + 8264: u'?!', + 8265: u'!?', + 8266: u'7', + 8304: u'0', + 8308: u'4', + 8309: u'5', + 8310: u'6', + 8311: u'7', + 8312: u'8', + 8313: u'9', + 8314: u'+', + 8315: u'-', + 8316: u'=', + 8317: u'(', + 8318: u')', + 8319: u'n', + 8320: u'0', + 8321: u'1', + 8322: u'2', + 8323: u'3', + 8324: u'4', + 8325: u'5', + 8326: u'6', + 8327: u'7', + 8328: u'8', + 8329: u'9', + 8330: u'+', + 8331: u'-', + 8332: u'=', + 8333: u'(', + 8334: u')', + 8364: u'E', + 8448: u'a/c', + 8449: u'a/s', + 8451: u'C', + 8453: u'c/o', + 8454: u'c/u', + 8457: u'F', + 8467: u'l', + 8470: u'No', + 8471: u'(P)', + 8480: u'[SM]', + 8481: u'TEL', + 8482: u'[TM]', + 8486: u'ohm', + 8490: u'K', + 8491: u'\xc5', + 8494: u'e', + 8531: u' 1/3', + 8532: u' 2/3', + 8533: u' 1/5', + 8534: u' 2/5', + 8535: u' 3/5', + 8536: u' 4/5', + 8537: u' 1/6', + 8538: u' 5/6', + 8539: u' 1/8', + 8540: u' 3/8', + 8541: u' 5/8', + 8542: u' 7/8', + 8543: u' 1/', + 8544: u'I', + 8545: u'II', + 8546: u'III', + 8547: u'IV', + 8548: u'V', + 8549: u'VI', + 8550: u'VII', + 8551: u'VIII', + 8552: u'IX', + 8553: u'X', + 8554: u'XI', + 8555: u'XII', + 8556: u'L', + 8557: u'C', + 8558: u'D', + 8559: u'M', + 8560: u'i', + 8561: u'ii', + 8562: u'iii', + 8563: u'iv', + 8564: u'v', + 8565: u'vi', + 8566: u'vii', + 8567: u'viii', + 8568: u'ix', + 8569: u'x', + 8570: u'xi', + 8571: u'xii', + 8572: u'l', + 8573: u'c', + 8574: u'd', + 8575: u'm', + 8592: u'<-', + 8593: u'^', + 8594: u'->', + 8595: u'v', + 8596: u'<->', + 8656: u'<=', + 8658: u'=>', + 8660: u'<=>', + 8722: u'-', + 8725: u'/', + 8726: u'\\', + 8727: u'*', + 8728: u'o', + 8729: u'\xb7', + 8734: u'inf', + 8739: u'|', + 8741: u'||', + 8758: u':', + 8764: u'~', + 8800: u'/=', + 8801: u'=', + 8804: u'<=', + 8805: u'>=', + 8810: u'<<', + 8811: u'>>', + 8853: u'(+)', + 8854: u'(-)', + 8855: u'(x)', + 8856: u'(/)', + 8866: u'|-', + 8867: u'-|', + 8870: u'|-', + 8871: u'|=', + 8872: u'|=', + 8873: u'||-', + 8901: u'\xb7', + 8902: u'*', + 8917: u'#', + 8920: u'<<<', + 8921: u'>>>', + 8943: u'...', + 9001: u'<', + 9002: u'>', + 9216: u'NUL', + 9217: u'SOH', + 9218: u'STX', + 9219: u'ETX', + 9220: u'EOT', + 9221: u'ENQ', + 9222: u'ACK', + 9223: u'BEL', + 9224: u'BS', + 9225: u'HT', + 9226: u'LF', + 9227: u'VT', + 9228: u'FF', + 9229: u'CR', + 9230: u'SO', + 9231: u'SI', + 9232: u'DLE', + 9233: u'DC1', + 9234: u'DC2', + 9235: u'DC3', + 9236: u'DC4', + 9237: u'NAK', + 9238: u'SYN', + 9239: u'ETB', + 9240: u'CAN', + 9241: u'EM', + 9242: u'SUB', + 9243: u'ESC', + 9244: u'FS', + 9245: u'GS', + 9246: u'RS', + 9247: u'US', + 9248: u'SP', + 9249: u'DEL', + 9251: u'_', + 9252: u'NL', + 9253: u'///', + 9254: u'?', + 9312: u'1', + 9313: u'2', + 9314: u'3', + 9315: u'4', + 9316: u'5', + 9317: u'6', + 9318: u'7', + 9319: u'8', + 9320: u'9', + 9321: u'(10)', + 9322: u'(11)', + 9323: u'(12)', + 9324: u'(13)', + 9325: u'(14)', + 9326: u'(15)', + 9327: u'(16)', + 9328: u'(17)', + 9329: u'(18)', + 9330: u'(19)', + 9331: u'(20)', + 9332: u'1', + 9333: u'2', + 9334: u'3', + 9335: u'4', + 9336: u'5', + 9337: u'6', + 9338: u'7', + 9339: u'8', + 9340: u'9', + 9341: u'(10)', + 9342: u'(11)', + 9343: u'(12)', + 9344: u'(13)', + 9345: u'(14)', + 9346: u'(15)', + 9347: u'(16)', + 9348: u'(17)', + 9349: u'(18)', + 9350: u'(19)', + 9351: u'(20)', + 9352: u'1', + 9353: u'2', + 9354: u'3', + 9355: u'4', + 9356: u'5', + 9357: u'6', + 9358: u'7', + 9359: u'8', + 9360: u'9', + 9361: u'10.', + 9362: u'11.', + 9363: u'12.', + 9364: u'13.', + 9365: u'14.', + 9366: u'15.', + 9367: u'16.', + 9368: u'17.', + 9369: u'18.', + 9370: u'19.', + 9371: u'20.', + 9372: u'a', + 9373: u'b', + 9374: u'c', + 9375: u'd', + 9376: u'e', + 9377: u'f', + 9378: u'g', + 9379: u'h', + 9380: u'i', + 9381: u'j', + 9382: u'k', + 9383: u'l', + 9384: u'm', + 9385: u'n', + 9386: u'o', + 9387: u'p', + 9388: u'q', + 9389: u'r', + 9390: u's', + 9391: u't', + 9392: u'u', + 9393: u'v', + 9394: u'w', + 9395: u'x', + 9396: u'y', + 9397: u'z', + 9398: u'A', + 9399: u'B', + 9400: u'C', + 9401: u'D', + 9402: u'E', + 9403: u'F', + 9404: u'G', + 9405: u'H', + 9406: u'I', + 9407: u'J', + 9408: u'K', + 9409: u'L', + 9410: u'M', + 9411: u'N', + 9412: u'O', + 9413: u'P', + 9414: u'Q', + 9415: u'R', + 9416: u'S', + 9417: u'T', + 9418: u'U', + 9419: u'V', + 9420: u'W', + 9421: u'X', + 9422: u'Y', + 9423: u'Z', + 9424: u'a', + 9425: u'b', + 9426: u'c', + 9427: u'd', + 9428: u'e', + 9429: u'f', + 9430: u'g', + 9431: u'h', + 9432: u'i', + 9433: u'j', + 9434: u'k', + 9435: u'l', + 9436: u'm', + 9437: u'n', + 9438: u'o', + 9439: u'p', + 9440: u'q', + 9441: u'r', + 9442: u's', + 9443: u't', + 9444: u'u', + 9445: u'v', + 9446: u'w', + 9447: u'x', + 9448: u'y', + 9449: u'z', + 9450: u'0', + 9472: u'-', + 9473: u'=', + 9474: u'|', + 9475: u'|', + 9476: u'-', + 9477: u'=', + 9478: u'|', + 9479: u'|', + 9480: u'-', + 9481: u'=', + 9482: u'|', + 9483: u'|', + 9484: u'+', + 9485: u'+', + 9486: u'+', + 9487: u'+', + 9488: u'+', + 9489: u'+', + 9490: u'+', + 9491: u'+', + 9492: u'+', + 9493: u'+', + 9494: u'+', + 9495: u'+', + 9496: u'+', + 9497: u'+', + 9498: u'+', + 9499: u'+', + 9500: u'+', + 9501: u'+', + 9502: u'+', + 9503: u'+', + 9504: u'+', + 9505: u'+', + 9506: u'+', + 9507: u'+', + 9508: u'+', + 9509: u'+', + 9510: u'+', + 9511: u'+', + 9512: u'+', + 9513: u'+', + 9514: u'+', + 9515: u'+', + 9516: u'+', + 9517: u'+', + 9518: u'+', + 9519: u'+', + 9520: u'+', + 9521: u'+', + 9522: u'+', + 9523: u'+', + 9524: u'+', + 9525: u'+', + 9526: u'+', + 9527: u'+', + 9528: u'+', + 9529: u'+', + 9530: u'+', + 9531: u'+', + 9532: u'+', + 9533: u'+', + 9534: u'+', + 9535: u'+', + 9536: u'+', + 9537: u'+', + 9538: u'+', + 9539: u'+', + 9540: u'+', + 9541: u'+', + 9542: u'+', + 9543: u'+', + 9544: u'+', + 9545: u'+', + 9546: u'+', + 9547: u'+', + 9548: u'-', + 9549: u'=', + 9550: u'|', + 9551: u'|', + 9552: u'=', + 9553: u'|', + 9554: u'+', + 9555: u'+', + 9556: u'+', + 9557: u'+', + 9558: u'+', + 9559: u'+', + 9560: u'+', + 9561: u'+', + 9562: u'+', + 9563: u'+', + 9564: u'+', + 9565: u'+', + 9566: u'+', + 9567: u'+', + 9568: u'+', + 9569: u'+', + 9570: u'+', + 9571: u'+', + 9572: u'+', + 9573: u'+', + 9574: u'+', + 9575: u'+', + 9576: u'+', + 9577: u'+', + 9578: u'+', + 9579: u'+', + 9580: u'+', + 9581: u'+', + 9582: u'+', + 9583: u'+', + 9584: u'+', + 9585: u'/', + 9586: u'\\', + 9587: u'X', + 9596: u'-', + 9597: u'|', + 9598: u'-', + 9599: u'|', + 9675: u'o', + 9702: u'o', + 9733: u'*', + 9734: u'*', + 9746: u'X', + 9747: u'X', + 9785: u':-(', + 9786: u':-)', + 9787: u'(-:', + 9837: u'b', + 9839: u'#', + 9985: u'%<', + 9986: u'%<', + 9987: u'%<', + 9988: u'%<', + 9996: u'V', + 10003: u'\u221a', + 10004: u'\u221a', + 10005: u'x', + 10006: u'x', + 10007: u'X', + 10008: u'X', + 10009: u'+', + 10010: u'+', + 10011: u'+', + 10012: u'+', + 10013: u'+', + 10014: u'+', + 10015: u'+', + 10016: u'+', + 10017: u'*', + 10018: u'+', + 10019: u'+', + 10020: u'+', + 10021: u'+', + 10022: u'+', + 10023: u'+', + 10025: u'*', + 10026: u'*', + 10027: u'*', + 10028: u'*', + 10029: u'*', + 10030: u'*', + 10031: u'*', + 10032: u'*', + 10033: u'*', + 10034: u'*', + 10035: u'*', + 10036: u'*', + 10037: u'*', + 10038: u'*', + 10039: u'*', + 10040: u'*', + 10041: u'*', + 10042: u'*', + 10043: u'*', + 10044: u'*', + 10045: u'*', + 10046: u'*', + 10047: u'*', + 10048: u'*', + 10049: u'*', + 10050: u'*', + 10051: u'*', + 10052: u'*', + 10053: u'*', + 10054: u'*', + 10055: u'*', + 10056: u'*', + 10057: u'*', + 10058: u'*', + 10059: u'*', + 64256: u'ff', + 64257: u'fi', + 64258: u'fl', + 64259: u'ffi', + 64260: u'ffl', + 64261: u'st', + 64262: u'st', + 65279: u'', + 65533: u'?', +} + +single_table = { + 160: u' ', + 161: u'!', + 162: u'c', + 165: u'Y', + 166: u'|', + 167: u'S', + 168: u'"', + 169: u'c', + 170: u'a', + 172: u'-', + 173: u'-', + 175: u'-', + 176: u' ', + 178: u'2', + 179: u'3', + 180: u"'", + 181: u'u', + 182: u'P', + 183: u'.', + 184: u',', + 185: u'1', + 186: u'o', + 191: u'?', + 192: u'A', + 193: u'A', + 194: u'A', + 195: u'A', + 196: u'A', + 197: u'A', + 198: u'A', + 199: u'C', + 200: u'E', + 201: u'E', + 202: u'E', + 203: u'E', + 204: u'I', + 205: u'I', + 206: u'I', + 207: u'I', + 208: u'D', + 209: u'N', + 210: u'O', + 211: u'O', + 212: u'O', + 213: u'O', + 214: u'O', + 215: u'x', + 216: u'O', + 217: u'U', + 218: u'U', + 219: u'U', + 220: u'U', + 221: u'Y', + 223: u'\u03b2', + 224: u'a', + 225: u'a', + 226: u'a', + 227: u'a', + 228: u'a', + 229: u'a', + 230: u'a', + 231: u'c', + 232: u'e', + 233: u'e', + 234: u'e', + 235: u'e', + 236: u'i', + 237: u'i', + 238: u'i', + 239: u'i', + 240: u'd', + 241: u'n', + 242: u'o', + 243: u'o', + 244: u'o', + 245: u'o', + 246: u'o', + 247: u':', + 248: u'o', + 249: u'u', + 250: u'u', + 251: u'u', + 252: u'u', + 253: u'y', + 255: u'y', + 256: u'A', + 257: u'a', + 258: u'A', + 259: u'a', + 260: u'A', + 261: u'a', + 262: u'C', + 263: u'c', + 264: u'C', + 265: u'c', + 266: u'C', + 267: u'c', + 268: u'C', + 269: u'c', + 270: u'D', + 271: u'd', + 272: u'D', + 273: u'd', + 274: u'E', + 275: u'e', + 276: u'E', + 277: u'e', + 278: u'E', + 279: u'e', + 280: u'E', + 281: u'e', + 282: u'E', + 283: u'e', + 284: u'G', + 285: u'g', + 286: u'G', + 287: u'g', + 288: u'G', + 289: u'g', + 290: u'G', + 291: u'g', + 292: u'H', + 293: u'h', + 294: u'H', + 295: u'h', + 296: u'I', + 297: u'i', + 298: u'I', + 299: u'i', + 300: u'I', + 301: u'i', + 302: u'I', + 303: u'i', + 304: u'I', + 305: u'i', + 308: u'J', + 309: u'j', + 310: u'K', + 311: u'k', + 312: u'k', + 313: u'L', + 314: u'l', + 315: u'L', + 316: u'l', + 317: u'L', + 318: u'l', + 321: u'L', + 322: u'l', + 323: u'N', + 324: u'n', + 325: u'N', + 326: u'n', + 327: u'N', + 328: u'n', + 330: u'N', + 331: u'n', + 332: u'O', + 333: u'o', + 334: u'O', + 335: u'o', + 336: u'O', + 337: u'o', + 340: u'R', + 341: u'r', + 342: u'R', + 343: u'r', + 344: u'R', + 345: u'r', + 346: u'S', + 347: u's', + 348: u'S', + 349: u's', + 350: u'S', + 351: u's', + 352: u'S', + 353: u's', + 354: u'T', + 355: u't', + 356: u'T', + 357: u't', + 358: u'T', + 359: u't', + 360: u'U', + 361: u'u', + 362: u'U', + 363: u'u', + 364: u'U', + 365: u'u', + 366: u'U', + 367: u'u', + 368: u'U', + 369: u'u', + 370: u'U', + 371: u'u', + 372: u'W', + 373: u'w', + 374: u'Y', + 375: u'y', + 376: u'Y', + 377: u'Z', + 378: u'z', + 379: u'Z', + 380: u'z', + 381: u'Z', + 382: u'z', + 383: u's', + 402: u'f', + 536: u'S', + 537: u's', + 538: u'T', + 539: u't', + 697: u"'", + 699: u'\u2018', + 700: u"'", + 701: u'\u201b', + 710: u'^', + 712: u"'", + 713: u'\xaf', + 716: u',', + 720: u':', + 730: u'\xb0', + 732: u'~', + 733: u'"', + 884: u"'", + 885: u',', + 894: u';', + 7682: u'B', + 7683: u'b', + 7690: u'D', + 7691: u'd', + 7710: u'F', + 7711: u'f', + 7744: u'M', + 7745: u'm', + 7766: u'P', + 7767: u'p', + 7776: u'S', + 7777: u's', + 7786: u'T', + 7787: u't', + 7808: u'W', + 7809: u'w', + 7810: u'W', + 7811: u'w', + 7812: u'W', + 7813: u'w', + 7922: u'Y', + 7923: u'y', + 8192: u' ', + 8194: u' ', + 8196: u' ', + 8197: u' ', + 8198: u' ', + 8199: u' ', + 8200: u' ', + 8201: u' ', + 8208: u'-', + 8209: u'-', + 8210: u'-', + 8211: u'-', + 8215: u'_', + 8216: u"'", + 8217: u"'", + 8218: u"'", + 8219: u"'", + 8220: u'"', + 8221: u'"', + 8222: u'"', + 8223: u'"', + 8224: u'+', + 8226: u'o', + 8227: u'>', + 8228: u'.', + 8231: u'-', + 8239: u' ', + 8242: u"'", + 8243: u'"', + 8245: u'`', + 8249: u'<', + 8250: u'>', + 8254: u'-', + 8259: u'-', + 8260: u'/', + 8266: u'7', + 8304: u'0', + 8308: u'4', + 8309: u'5', + 8310: u'6', + 8311: u'7', + 8312: u'8', + 8313: u'9', + 8314: u'+', + 8315: u'-', + 8316: u'=', + 8317: u'(', + 8318: u')', + 8319: u'n', + 8320: u'0', + 8321: u'1', + 8322: u'2', + 8323: u'3', + 8324: u'4', + 8325: u'5', + 8326: u'6', + 8327: u'7', + 8328: u'8', + 8329: u'9', + 8330: u'+', + 8331: u'-', + 8332: u'=', + 8333: u'(', + 8334: u')', + 8364: u'E', + 8451: u'C', + 8457: u'F', + 8467: u'l', + 8490: u'K', + 8491: u'\xc5', + 8494: u'e', + 8544: u'I', + 8548: u'V', + 8553: u'X', + 8556: u'L', + 8557: u'C', + 8558: u'D', + 8559: u'M', + 8560: u'i', + 8564: u'v', + 8569: u'x', + 8572: u'l', + 8573: u'c', + 8574: u'd', + 8575: u'm', + 8593: u'^', + 8595: u'v', + 8722: u'-', + 8725: u'/', + 8726: u'\\', + 8727: u'*', + 8728: u'o', + 8729: u'\xb7', + 8739: u'|', + 8758: u':', + 8764: u'~', + 8801: u'=', + 8901: u'\xb7', + 8902: u'*', + 8917: u'#', + 9001: u'<', + 9002: u'>', + 9251: u'_', + 9254: u'?', + 9312: u'1', + 9313: u'2', + 9314: u'3', + 9315: u'4', + 9316: u'5', + 9317: u'6', + 9318: u'7', + 9319: u'8', + 9320: u'9', + 9332: u'1', + 9333: u'2', + 9334: u'3', + 9335: u'4', + 9336: u'5', + 9337: u'6', + 9338: u'7', + 9339: u'8', + 9340: u'9', + 9352: u'1', + 9353: u'2', + 9354: u'3', + 9355: u'4', + 9356: u'5', + 9357: u'6', + 9358: u'7', + 9359: u'8', + 9360: u'9', + 9372: u'a', + 9373: u'b', + 9374: u'c', + 9375: u'd', + 9376: u'e', + 9377: u'f', + 9378: u'g', + 9379: u'h', + 9380: u'i', + 9381: u'j', + 9382: u'k', + 9383: u'l', + 9384: u'm', + 9385: u'n', + 9386: u'o', + 9387: u'p', + 9388: u'q', + 9389: u'r', + 9390: u's', + 9391: u't', + 9392: u'u', + 9393: u'v', + 9394: u'w', + 9395: u'x', + 9396: u'y', + 9397: u'z', + 9398: u'A', + 9399: u'B', + 9400: u'C', + 9401: u'D', + 9402: u'E', + 9403: u'F', + 9404: u'G', + 9405: u'H', + 9406: u'I', + 9407: u'J', + 9408: u'K', + 9409: u'L', + 9410: u'M', + 9411: u'N', + 9412: u'O', + 9413: u'P', + 9414: u'Q', + 9415: u'R', + 9416: u'S', + 9417: u'T', + 9418: u'U', + 9419: u'V', + 9420: u'W', + 9421: u'X', + 9422: u'Y', + 9423: u'Z', + 9424: u'a', + 9425: u'b', + 9426: u'c', + 9427: u'd', + 9428: u'e', + 9429: u'f', + 9430: u'g', + 9431: u'h', + 9432: u'i', + 9433: u'j', + 9434: u'k', + 9435: u'l', + 9436: u'm', + 9437: u'n', + 9438: u'o', + 9439: u'p', + 9440: u'q', + 9441: u'r', + 9442: u's', + 9443: u't', + 9444: u'u', + 9445: u'v', + 9446: u'w', + 9447: u'x', + 9448: u'y', + 9449: u'z', + 9450: u'0', + 9472: u'-', + 9473: u'=', + 9474: u'|', + 9475: u'|', + 9476: u'-', + 9477: u'=', + 9478: u'|', + 9479: u'|', + 9480: u'-', + 9481: u'=', + 9482: u'|', + 9483: u'|', + 9484: u'+', + 9485: u'+', + 9486: u'+', + 9487: u'+', + 9488: u'+', + 9489: u'+', + 9490: u'+', + 9491: u'+', + 9492: u'+', + 9493: u'+', + 9494: u'+', + 9495: u'+', + 9496: u'+', + 9497: u'+', + 9498: u'+', + 9499: u'+', + 9500: u'+', + 9501: u'+', + 9502: u'+', + 9503: u'+', + 9504: u'+', + 9505: u'+', + 9506: u'+', + 9507: u'+', + 9508: u'+', + 9509: u'+', + 9510: u'+', + 9511: u'+', + 9512: u'+', + 9513: u'+', + 9514: u'+', + 9515: u'+', + 9516: u'+', + 9517: u'+', + 9518: u'+', + 9519: u'+', + 9520: u'+', + 9521: u'+', + 9522: u'+', + 9523: u'+', + 9524: u'+', + 9525: u'+', + 9526: u'+', + 9527: u'+', + 9528: u'+', + 9529: u'+', + 9530: u'+', + 9531: u'+', + 9532: u'+', + 9533: u'+', + 9534: u'+', + 9535: u'+', + 9536: u'+', + 9537: u'+', + 9538: u'+', + 9539: u'+', + 9540: u'+', + 9541: u'+', + 9542: u'+', + 9543: u'+', + 9544: u'+', + 9545: u'+', + 9546: u'+', + 9547: u'+', + 9548: u'-', + 9549: u'=', + 9550: u'|', + 9551: u'|', + 9552: u'=', + 9553: u'|', + 9554: u'+', + 9555: u'+', + 9556: u'+', + 9557: u'+', + 9558: u'+', + 9559: u'+', + 9560: u'+', + 9561: u'+', + 9562: u'+', + 9563: u'+', + 9564: u'+', + 9565: u'+', + 9566: u'+', + 9567: u'+', + 9568: u'+', + 9569: u'+', + 9570: u'+', + 9571: u'+', + 9572: u'+', + 9573: u'+', + 9574: u'+', + 9575: u'+', + 9576: u'+', + 9577: u'+', + 9578: u'+', + 9579: u'+', + 9580: u'+', + 9581: u'+', + 9582: u'+', + 9583: u'+', + 9584: u'+', + 9585: u'/', + 9586: u'\\', + 9587: u'X', + 9596: u'-', + 9597: u'|', + 9598: u'-', + 9599: u'|', + 9675: u'o', + 9702: u'o', + 9733: u'*', + 9734: u'*', + 9746: u'X', + 9747: u'X', + 9837: u'b', + 9839: u'#', + 9996: u'V', + 10003: u'\u221a', + 10004: u'\u221a', + 10005: u'x', + 10006: u'x', + 10007: u'X', + 10008: u'X', + 10009: u'+', + 10010: u'+', + 10011: u'+', + 10012: u'+', + 10013: u'+', + 10014: u'+', + 10015: u'+', + 10016: u'+', + 10017: u'*', + 10018: u'+', + 10019: u'+', + 10020: u'+', + 10021: u'+', + 10022: u'+', + 10023: u'+', + 10025: u'*', + 10026: u'*', + 10027: u'*', + 10028: u'*', + 10029: u'*', + 10030: u'*', + 10031: u'*', + 10032: u'*', + 10033: u'*', + 10034: u'*', + 10035: u'*', + 10036: u'*', + 10037: u'*', + 10038: u'*', + 10039: u'*', + 10040: u'*', + 10041: u'*', + 10042: u'*', + 10043: u'*', + 10044: u'*', + 10045: u'*', + 10046: u'*', + 10047: u'*', + 10048: u'*', + 10049: u'*', + 10050: u'*', + 10051: u'*', + 10052: u'*', + 10053: u'*', + 10054: u'*', + 10055: u'*', + 10056: u'*', + 10057: u'*', + 10058: u'*', + 10059: u'*', + 65533: u'?', +} + + +### < From b14831613ebc8259825db5cdedd5dfe17c459d2e Mon Sep 17 00:00:00 2001 From: winniehell Date: Mon, 2 Dec 2013 21:35:48 +0100 Subject: [PATCH 004/302] use translitcodec for urlify --- gluon/validators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gluon/validators.py b/gluon/validators.py index 0107e43a..598afc61 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -19,6 +19,7 @@ import struct import decimal import unicodedata from cStringIO import StringIO +from gluon.contrib import translitcodec from gluon.utils import simple_hash, web2py_uuid, DIGEST_ALG_BY_SIZE from gluon.dal import FieldVirtual, FieldMethod @@ -2511,7 +2512,7 @@ def urlify(s, maxlen=80, keep_underscores=False): if isinstance(s, str): s = s.decode('utf-8') # to unicode s = s.lower() # to lowercase - s = unicodedata.normalize('NFKD', s) # normalize eg è => e, ñ => n + s = s.encode('translit/long') # replace special characters s = s.encode('ascii', 'ignore') # encode as ASCII s = re.sub('&\w+?;', '', s) # strip html entities if keep_underscores: From 15cedc02697fa15a2b358ef33f622df43b1278f7 Mon Sep 17 00:00:00 2001 From: winniehell Date: Mon, 2 Dec 2013 22:22:41 +0100 Subject: [PATCH 005/302] remove unnecessary imports --- gluon/validators.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gluon/validators.py b/gluon/validators.py index 598afc61..7b32e32a 100644 --- a/gluon/validators.py +++ b/gluon/validators.py @@ -17,9 +17,7 @@ import cgi import urllib import struct import decimal -import unicodedata from cStringIO import StringIO -from gluon.contrib import translitcodec from gluon.utils import simple_hash, web2py_uuid, DIGEST_ALG_BY_SIZE from gluon.dal import FieldVirtual, FieldMethod From b0b2fd78043a7a86c3923bb6a0958d7993cb6e49 Mon Sep 17 00:00:00 2001 From: niphlod Date: Tue, 10 Dec 2013 21:08:39 +0100 Subject: [PATCH 006/302] fixed naming bug. Thanks @Peter Govers for the patch --- applications/admin/static/js/web2py.js | 2 +- applications/examples/static/js/web2py.js | 2 +- applications/welcome/static/js/web2py.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index e714d3cc..c7a522a9 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -679,7 +679,7 @@ /* compatibility code - start */ ajax = jQuery.web2py.ajax; web2py_component = jQuery.web2py.component; -web2py_websocket = jQuery.web2py.websocket; +web2py_websocket = jQuery.web2py.web2py_websocket; web2py_ajax_page = jQuery.web2py.ajax_page; /*needed for IS_STRONG(entropy)*/ web2py_validate_entropy = jQuery.web2py.validate_entropy; diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index e714d3cc..c7a522a9 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -679,7 +679,7 @@ /* compatibility code - start */ ajax = jQuery.web2py.ajax; web2py_component = jQuery.web2py.component; -web2py_websocket = jQuery.web2py.websocket; +web2py_websocket = jQuery.web2py.web2py_websocket; web2py_ajax_page = jQuery.web2py.ajax_page; /*needed for IS_STRONG(entropy)*/ web2py_validate_entropy = jQuery.web2py.validate_entropy; diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index e714d3cc..c7a522a9 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -679,7 +679,7 @@ /* compatibility code - start */ ajax = jQuery.web2py.ajax; web2py_component = jQuery.web2py.component; -web2py_websocket = jQuery.web2py.websocket; +web2py_websocket = jQuery.web2py.web2py_websocket; web2py_ajax_page = jQuery.web2py.ajax_page; /*needed for IS_STRONG(entropy)*/ web2py_validate_entropy = jQuery.web2py.validate_entropy; From 371f97e050c1ceaeee2c4c7332ba38e14d31994b Mon Sep 17 00:00:00 2001 From: ilvalle Date: Wed, 11 Dec 2013 15:50:19 +0100 Subject: [PATCH 007/302] invalidate function in web2py.js --- applications/admin/static/js/web2py.js | 13 ++++++++++++- applications/examples/static/js/web2py.js | 13 ++++++++++++- applications/welcome/static/js/web2py.js | 13 ++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index c7a522a9..4a823845 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -659,7 +659,18 @@ el.on('ajax:complete', 'form[data-w2p_target]', function (e) { web2py.enableFormElements($(this)); }); - } + }, + /* Invalidate and force reload of a web2py component + */ + invalidate: function(target) { + $('div[data-w2p_remote]', target).each(function () { + var el = $('#' + $(this).attr('id')).get(0); + if (el.timing !== undefined) { // Block triggering regular routines + clearInterval(el.timing); + } + }); + $.web2py.component_handler(target); + }, } /*end of functions */ diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index c7a522a9..4a823845 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -659,7 +659,18 @@ el.on('ajax:complete', 'form[data-w2p_target]', function (e) { web2py.enableFormElements($(this)); }); - } + }, + /* Invalidate and force reload of a web2py component + */ + invalidate: function(target) { + $('div[data-w2p_remote]', target).each(function () { + var el = $('#' + $(this).attr('id')).get(0); + if (el.timing !== undefined) { // Block triggering regular routines + clearInterval(el.timing); + } + }); + $.web2py.component_handler(target); + }, } /*end of functions */ diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index c7a522a9..4a823845 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -659,7 +659,18 @@ el.on('ajax:complete', 'form[data-w2p_target]', function (e) { web2py.enableFormElements($(this)); }); - } + }, + /* Invalidate and force reload of a web2py component + */ + invalidate: function(target) { + $('div[data-w2p_remote]', target).each(function () { + var el = $('#' + $(this).attr('id')).get(0); + if (el.timing !== undefined) { // Block triggering regular routines + clearInterval(el.timing); + } + }); + $.web2py.component_handler(target); + }, } /*end of functions */ From 69f9cf28dfa9539868ab37c1d6651b5216ea7a75 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 11 Dec 2013 20:33:24 -0600 Subject: [PATCH 008/302] fixed db(((db.table1.field1 + db.table1.field2)>4)).select(), thanks Boris --- VERSION | 2 +- gluon/dal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 05a0c515..aa97e7a4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.09.21.27.36 +Version 2.8.2-stable+timestamp.2013.12.11.20.32.28 diff --git a/gluon/dal.py b/gluon/dal.py index 3108a781..902d16a1 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1460,7 +1460,7 @@ class BaseAdapter(ConnectionPool): return '(%s)' % ' || '.join(self.expand(x,'string') for x in items) def ADD(self, first, second): - if self.is_numerical_type(first.type): + if self.is_numerical_type(first.type) or isinstance(first.type, gluon.dal.Field): return '(%s + %s)' % (self.expand(first), self.expand(second, first.type)) else: From 4aabf3c69c887785c56913fc0081527d95aba3ab Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 11 Dec 2013 20:36:39 -0600 Subject: [PATCH 009/302] fixed typo, thanks User --- VERSION | 2 +- gluon/dal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index aa97e7a4..1b5a63e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.11.20.32.28 +Version 2.8.2-stable+timestamp.2013.12.11.20.35.40 diff --git a/gluon/dal.py b/gluon/dal.py index 902d16a1..8c6420df 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -2979,7 +2979,7 @@ class PostgreSQLAdapter(BaseAdapter): def ST_DWITHIN(self, first, (second, third)): """ - http://postgis.org/docs/ST_Within.html + http://postgis.org/docs/ST_DWithin.html """ return 'ST_DWithin(%s,%s,%s)' %(self.expand(first), self.expand(second, first.type), From 2d669a50b2f6d8f86f960cdb3807fdca8adc0ec2 Mon Sep 17 00:00:00 2001 From: ilvalle Date: Fri, 13 Dec 2013 12:09:52 +0100 Subject: [PATCH 010/302] Manage w2p:enable-with in order to reuse form --- applications/admin/static/js/web2py.js | 15 +++++++++++---- applications/examples/static/js/web2py.js | 15 +++++++++++---- applications/welcome/static/js/web2py.js | 15 +++++++++++---- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index 4a823845..e11610cb 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -485,8 +485,10 @@ el.addClass('disabled'); var method = el.prop('type') == 'submit' ? 'val' : 'html'; var disable_with_message = (typeof w2p_ajax_disable_with_message != 'undefined') ? w2p_ajax_disable_with_message : "Working..."; - /*store enabled state*/ - el.data('w2p:enable-with', el[method]()); + /*store enabled state if not already disabled */ + if (el.data('w2p:enable-with') === undefined) { + el.data('w2p:enable-with', el[method]()); + } /*if you don't want to see "working..." on buttons, replace the following * two lines with this one * el.data('w2p_disable_with', el[method]()); @@ -633,7 +635,9 @@ if(disable_with == undefined) { element.data('w2p_disable_with', element[method]()) } - element.data('w2p:enable-with', element[method]()); + if (element.data('w2p:enable-with') === undefined) { + element.data('w2p:enable-with', element[method]()); + } element[method](element.data('w2p_disable_with')); element.prop('disabled', true); }); @@ -647,7 +651,10 @@ form.find(web2py.enableSelector).each(function () { var element = $(this), method = element.is('button') ? 'html' : 'val'; - if(element.data('w2p:enable-with')) element[method](element.data('w2p:enable-with')); + if(element.data('w2p:enable-with')) { + element[method](element.data('w2p:enable-with')); + element.removeData('w2p:enable-with'); + } element.prop('disabled', false); }); }, diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index 4a823845..e11610cb 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -485,8 +485,10 @@ el.addClass('disabled'); var method = el.prop('type') == 'submit' ? 'val' : 'html'; var disable_with_message = (typeof w2p_ajax_disable_with_message != 'undefined') ? w2p_ajax_disable_with_message : "Working..."; - /*store enabled state*/ - el.data('w2p:enable-with', el[method]()); + /*store enabled state if not already disabled */ + if (el.data('w2p:enable-with') === undefined) { + el.data('w2p:enable-with', el[method]()); + } /*if you don't want to see "working..." on buttons, replace the following * two lines with this one * el.data('w2p_disable_with', el[method]()); @@ -633,7 +635,9 @@ if(disable_with == undefined) { element.data('w2p_disable_with', element[method]()) } - element.data('w2p:enable-with', element[method]()); + if (element.data('w2p:enable-with') === undefined) { + element.data('w2p:enable-with', element[method]()); + } element[method](element.data('w2p_disable_with')); element.prop('disabled', true); }); @@ -647,7 +651,10 @@ form.find(web2py.enableSelector).each(function () { var element = $(this), method = element.is('button') ? 'html' : 'val'; - if(element.data('w2p:enable-with')) element[method](element.data('w2p:enable-with')); + if(element.data('w2p:enable-with')) { + element[method](element.data('w2p:enable-with')); + element.removeData('w2p:enable-with'); + } element.prop('disabled', false); }); }, diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index 4a823845..e11610cb 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -485,8 +485,10 @@ el.addClass('disabled'); var method = el.prop('type') == 'submit' ? 'val' : 'html'; var disable_with_message = (typeof w2p_ajax_disable_with_message != 'undefined') ? w2p_ajax_disable_with_message : "Working..."; - /*store enabled state*/ - el.data('w2p:enable-with', el[method]()); + /*store enabled state if not already disabled */ + if (el.data('w2p:enable-with') === undefined) { + el.data('w2p:enable-with', el[method]()); + } /*if you don't want to see "working..." on buttons, replace the following * two lines with this one * el.data('w2p_disable_with', el[method]()); @@ -633,7 +635,9 @@ if(disable_with == undefined) { element.data('w2p_disable_with', element[method]()) } - element.data('w2p:enable-with', element[method]()); + if (element.data('w2p:enable-with') === undefined) { + element.data('w2p:enable-with', element[method]()); + } element[method](element.data('w2p_disable_with')); element.prop('disabled', true); }); @@ -647,7 +651,10 @@ form.find(web2py.enableSelector).each(function () { var element = $(this), method = element.is('button') ? 'html' : 'val'; - if(element.data('w2p:enable-with')) element[method](element.data('w2p:enable-with')); + if(element.data('w2p:enable-with')) { + element[method](element.data('w2p:enable-with')); + element.removeData('w2p:enable-with'); + } element.prop('disabled', false); }); }, From 51728fb192d6ca682764266c78ffb6f9cb414952 Mon Sep 17 00:00:00 2001 From: ilvalle Date: Sat, 14 Dec 2013 09:37:30 +0100 Subject: [PATCH 011/302] a more harmonic create_file in admin editor --- applications/admin/controllers/default.py | 17 +++++++++----- applications/admin/views/default/edit.html | 26 +++------------------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 723b63c9..b02e5eac 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -1379,10 +1379,10 @@ def create_file(): safe_write(full_filename, text) log_progress(app, 'CREATE', filename) if request.vars.dir: - result = T('file "%(filename)s" created', + result = T('file "%(filename)s" created', dict(filename=full_filename[len(path):])) - else: - session.flash = T('file "%(filename)s" created', + else: + session.flash = T('file "%(filename)s" created', dict(filename=full_filename[len(path):])) vars = {} if request.vars.id: @@ -1391,13 +1391,20 @@ def create_file(): vars['app'] = request.vars.app redirect(URL('edit', args=[os.path.join(request.vars.location, filename)], vars=vars)) + except Exception, e: if not isinstance(e, HTTP): session.flash = T('cannot create file') if request.vars.dir: - id_filename = '#' + request.vars.dir + '__' + filename.replace('.','__') + ' a' - return response.json({'result':result, 'id_filename':id_filename}) + response.flash = result + response.headers['web2py-component-content'] = 'append' + response.headers['web2py-component-command'] = """ + $.web2py.invalidate('#files_menu'); + load_file('%s'); + $.web2py.enableElement($('#form form').find($.web2py.formInputClickSelector)); + """ % URL('edit', args=[app,request.vars.dir,filename]) + return '' else: redirect(request.vars.sender + anchor) diff --git a/applications/admin/views/default/edit.html b/applications/admin/views/default/edit.html index ba82c94c..4e0aeac2 100644 --- a/applications/admin/views/default/edit.html +++ b/applications/admin/views/default/edit.html @@ -240,35 +240,13 @@ $(document).on('click', 'a.font_button', function (e) {
{{=file_create_form('%s/' % app, '')}} -

- {{=LOAD('default', 'files_menu', vars={'app':app})}} + {{=LOAD('default', 'files_menu', vars={'app':app}, ajax=True)}}
@@ -318,6 +296,8 @@ $(document).ready(function() { var ow = filesMenu.outerWidth(); filesMenu.width(ow); $('#files').css('left', '-'+ow+'px'); + $.web2py.trap_form('url', 'form'); + $('#form form').addClass('no_trap'); // Let to reuse the same form }); From 42de43d052c2c64f52cdcde7db50d4e900ecb12f Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 14 Dec 2013 20:03:35 -0600 Subject: [PATCH 012/302] fixed 1814:session.connect: parameter migrate=False has no effect, thanks lucmurer --- VERSION | 2 +- gluon/globals.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 1b5a63e2..b276869c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.11.20.35.40 +Version 2.8.2-stable+timestamp.2013.12.14.20.02.42 diff --git a/gluon/globals.py b/gluon/globals.py index 58b2c0de..08e09f64 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -816,7 +816,10 @@ class Session(Storage): # if on GAE tickets go also in DB if settings.global_settings.web2py_runtime_gae: request.tickets_db = db - table_migrate = (masterapp == request.application) + if masterapp == request.application: + table_migrate = migrate + else: + table_migrate = False tname = tablename + '_' + masterapp table = db.get(tname, None) Field = db.Field From 09c0069b43fe5a5246189ab5d14b108a96d51327 Mon Sep 17 00:00:00 2001 From: niphlod Date: Sun, 15 Dec 2013 15:06:42 +0100 Subject: [PATCH 013/302] fix mssql quoting issue, disabled some tests Tests now pass on mssql. I think we need to agree on what's going on with DAL, or we risk shipping a module with lots of changes that are breaking backward compatibility. I'll start a thread on web2py-developers --- gluon/dal.py | 4 ++-- gluon/tests/test_dal.py | 49 ++++++++++++++++++++++++++++++----------- 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/gluon/dal.py b/gluon/dal.py index 8c6420df..80ee34d7 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -3291,8 +3291,8 @@ class OracleAdapter(BaseAdapter): class MSSQLAdapter(BaseAdapter): drivers = ('pyodbc',) T_SEP = 'T' - - QUOTE_TEMPLATE = "[%s]" + + QUOTE_TEMPLATE = '"%s"' types = { 'boolean': 'BIT', diff --git a/gluon/tests/test_dal.py b/gluon/tests/test_dal.py index b77fdb13..0ca8b585 100644 --- a/gluon/tests/test_dal.py +++ b/gluon/tests/test_dal.py @@ -1396,24 +1396,26 @@ class TestRNameFields(unittest.TestCase): self.assertEqual(len(db.person._referenced_by),0) db.person.drop() + class TestQuoting(unittest.TestCase): # tests for complex table names def testRun(self): + return db = DAL(DEFAULT_URI, check_reserved=['all']) t0 = db.define_table('A.table.with.dots and spaces', Field('f', 'string')) t1 = db.define_table('A.table', - Field('f.other', t0), + Field('f_other', t0), Field('words', 'text')) blather = 'blah blah and so' t0[0] = {'f': 'content'} - t1[0] = {'f.other': int(t0[1]['id']), + t1[0] = {'f_other': int(t0[1]['id']), 'words': blather} - r = db(t1['f.other']==t0.id).select() + r = db(t1['f_other']==t0.id).select() self.assertEqual(r[0][db['A.table']].words, blather) db.define_table('t0', Field('f0')) @@ -1423,17 +1425,26 @@ class TestQuoting(unittest.TestCase): rows=db(db.t0.id==db.t1.t0).select() self.assertEqual(rows[0].t1.t0, rows[0].t0.id) - - t0.drop('cascade') - t1.drop() + if DEFAULT_URI.startswith('mssql'): + #there's no drop cascade in mssql + t1.drop() + t0.drop() + else: + t0.drop('cascade') + t1.drop() db.t1.drop() db.t0.drop() # tests for case sensitivity def testCase(self): + return db = DAL(DEFAULT_URI, check_reserved=['all'], ignore_field_case=False) - + if DEFAULT_URI.startswith('mssql'): + #multiple cascade gotcha + for key in ['reference','reference FK']: + db._adapter.types[key]=db._adapter.types[key].replace( + '%(on_delete_action)s','NO ACTION') # test table case t0 = db.define_table('B', @@ -1482,16 +1493,21 @@ class TestQuoting(unittest.TestCase): t0.drop() def testPKFK(self): + # test primary keys db = DAL(DEFAULT_URI, check_reserved=['all'], ignore_field_case=False) - + if DEFAULT_URI.startswith('mssql'): + #multiple cascade gotcha + for key in ['reference','reference FK']: + db._adapter.types[key]=db._adapter.types[key].replace( + '%(on_delete_action)s','NO ACTION') # test table without surrogate key. Length must is limited to # 100 because of MySQL limitations: it cannot handle more than # 767 bytes in unique keys. t0 = db.define_table('t0', Field('Code', length=100), primarykey=['Code']) - t22 = db.define_table('t22', Field('f'), Field('t0_Code', 'reference t0')) + t2 = db.define_table('t2', Field('f'), Field('t0_Code', 'reference t0')) t3 = db.define_table('t3', Field('f', length=100), Field('t0_Code', t0.Code), primarykey=['f']) t4 = db.define_table('t4', Field('f', length=100), Field('t0', t0), primarykey=['f']) @@ -1500,11 +1516,18 @@ class TestQuoting(unittest.TestCase): except Exception, e: self.assertTrue(isinstance(e, KeyError)) + if DEFAULT_URI.startswith('mssql'): + #there's no drop cascade in mssql + t3.drop() + t4.drop() + t2.drop() + t0.drop() + else: + t0.drop('cascade') + t2.drop() + t3.drop() + t4.drop() - t0.drop('cascade') - t22.drop() - t3.drop() - t4.drop() if __name__ == '__main__': unittest.main() tearDownModule() From 53a0718a7842514fd7224092039cd8d76c12fc13 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 15 Dec 2013 13:31:56 -0600 Subject: [PATCH 014/302] fixed problem with lack of connector in NoSQL --- VERSION | 2 +- gluon/dal.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b276869c..092f1d9d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.14.20.02.42 +Version 2.8.2-stable+timestamp.2013.12.15.13.31.12 diff --git a/gluon/dal.py b/gluon/dal.py index 80ee34d7..47be7dbc 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -703,6 +703,7 @@ class BaseAdapter(ConnectionPool): can_select_for_update = True dbpath = None folder = None + connector = lambda dbpath, adapter_args: None # __init__ should override this TRUE = 'T' FALSE = 'F' From 104ec5ba7302035111608274f665065996ff0a95 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 15 Dec 2013 22:23:57 -0600 Subject: [PATCH 015/302] fixed issue 1818, error in wiki/renderer, thanks Alan --- VERSION | 2 +- gluon/tools.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 092f1d9d..98d07a7d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.15.13.31.12 +Version 2.8.2-stable+timestamp.2013.12.15.22.22.52 diff --git a/gluon/tools.py b/gluon/tools.py index f802d21f..b0d4d3a5 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -5523,7 +5523,7 @@ class Wiki(object): url = URL(args=('_edit', slug)) return dict(content=A('Create page "%s"' % slug, _href=url, _class="btn")) else: - html = page.html if not force_render else self.get_renderer(page) + html = page.html if not force_render else self.get_renderer()(page) content = XML(self.fix_hostname(html)) return dict(title=page.title, slug=page.slug, From 7646dc11fe33e0088a52df2881a51ad64d391301 Mon Sep 17 00:00:00 2001 From: Alan Etkin Date: Mon, 16 Dec 2013 17:24:51 -0300 Subject: [PATCH 016/302] Enable admin app for GAE (experimental) --- applications/admin/controllers/default.py | 23 ++++++++++++++++++----- examples/app.example.yaml | 4 ++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index b02e5eac..00082613 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -30,10 +30,18 @@ from gluon.languages import (read_possible_languages, read_dict, write_dict, read_plural_dict, write_plural_dict) -if DEMO_MODE and request.function in ['change_password', 'pack', 'pack_custom','pack_plugin', 'upgrade_web2py', 'uninstall', 'cleanup', 'compile_app', 'remove_compiled_app', 'delete', 'delete_plugin', 'create_file', 'upload_file', 'update_languages', 'reload_routes', 'git_push', 'git_pull']: +if DEMO_MODE and request.function in ['change_password', 'pack', +'pack_custom','pack_plugin', 'upgrade_web2py', 'uninstall', +'cleanup', 'compile_app', 'remove_compiled_app', 'delete', +'delete_plugin', 'create_file', 'upload_file', 'update_languages', +'reload_routes', 'git_push', 'git_pull', 'install_plugin']: session.flash = T('disabled in demo mode') redirect(URL('site')) +if is_gae and request.function in ('edit', 'edit_language', +'edit_plurals', 'update_languages', 'create_file', 'install_plugin'): + session.flash = T('disabled in GAE mode') + redirect(URL('site')) if not is_manager() and request.function in ['change_password', 'upgrade_web2py']: session.flash = T('disabled in multi user mode') @@ -63,10 +71,12 @@ def log_progress(app, mode='EDIT', filename=None, progress=0): def safe_open(a, b): - if DEMO_MODE and ('w' in b or 'a' in b): + if (DEMO_MODE or is_gae) and ('w' in b or 'a' in b): class tmp: def write(self, data): pass + def close(self): + pass return tmp() return open(a, b) @@ -1496,7 +1506,7 @@ def errors(): app = get_app() - method = request.args(1) or 'new' + method = request.args(1) or 'new' if not is_gae else "dbnew" db_ready = {} db_ready['status'] = get_ticket_storage(app) db_ready['errmessage'] = T( @@ -1588,7 +1598,7 @@ def errors(): decorated.sort(key=operator.itemgetter(0), reverse=True) - return dict(errors=[x[1] for x in decorated], app=app, method=method) + return dict(errors=[x[1] for x in decorated], app=app, method=method, db_ready=db_ready) elif method == 'dbold': tk_db, tk_table = get_ticket_storage(app) @@ -1601,7 +1611,7 @@ def errors(): times = dict( [(row.ticket_id, row.created_datetime) for row in tickets_]) - return dict(app=app, tickets=tickets, method=method, times=times) + return dict(app=app, tickets=tickets, method=method, times=times, db_ready=db_ready) else: for item in request.vars: @@ -1625,6 +1635,9 @@ def get_ticket_storage(app): if os.path.exists(ticket_file): db_string = open(ticket_file).read() db_string = db_string.strip().replace('\r', '').replace('\n', '') + elif is_gae: + # use Datastore as fallback if there is no ticket_file + db_string = "google:datastore" else: return False tickets_table = 'web2py_ticket' diff --git a/examples/app.example.yaml b/examples/app.example.yaml index b56a16e5..ff608af1 100644 --- a/examples/app.example.yaml +++ b/examples/app.example.yaml @@ -65,8 +65,8 @@ skip_files: | (.*\.py[co])| (.*/RCS/.*)| (\..*)| - (applications/(admin|examples)/.*)| - ((admin|examples|welcome)\.(w2p|tar))| + (applications/examples/.*)| + ((examples|welcome)\.(w2p|tar))| (applications/.*?/(cron|databases|errors|cache|sessions)/.*)| ((logs|scripts)/.*)| (anyserver\.py)| From c790b79393b52e622a8b5b13fad05d7232ae654b Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 16 Dec 2013 21:56:28 -0600 Subject: [PATCH 017/302] autolink emails --- VERSION | 2 +- gluon/contrib/autolinks.py | 2 ++ gluon/contrib/markmin/markmin2html.py | 9 +++++++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 98d07a7d..ae14e219 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.15.22.22.52 +Version 2.8.2-stable+timestamp.2013.12.16.21.55.21 diff --git a/gluon/contrib/autolinks.py b/gluon/contrib/autolinks.py index af3d1247..23e9ed10 100644 --- a/gluon/contrib/autolinks.py +++ b/gluon/contrib/autolinks.py @@ -159,6 +159,8 @@ def extension(url): def expand_one(url, cdict): # try ombed but first check in cache + if '@' in url and not '://'in url: + return '%s' % (url, url) if cdict and url in cdict: r = cdict[url] else: diff --git a/gluon/contrib/markmin/markmin2html.py b/gluon/contrib/markmin/markmin2html.py index 2d3b2aa9..95f9dc56 100755 --- a/gluon/contrib/markmin/markmin2html.py +++ b/gluon/contrib/markmin/markmin2html.py @@ -551,7 +551,7 @@ regex_list=re.compile('^(?:(?:(#{1,6})|(?:(\.+|\++|\-+)(\.)?))\s*)?(.*)$') regex_bq_headline=re.compile('^(?:(\.+|\++|\-+)(\.)?\s+)?(-{3}-*)$') regex_tq=re.compile('^(-{3}-*)(?::(?P[a-zA-Z][_a-zA-Z\-\d]*)(?:\[(?P

[a-zA-Z][_a-zA-Z\-\d]*)\])?)?$') regex_proto = re.compile(r'(?/=])(?P

\w+):(?P\w+://[\w\d\-+=?%&/:.]+)', re.M) -regex_auto = re.compile(r'(?/=])(?P\w+://[\w\d\-+_=?%&/:.,;#]+\w)',re.M) +regex_auto = re.compile(r'(?/=])(?P\w+://[\w\d\-+_=?%&/:.,;#]+\w|[\w\-.]+@[\w\-.]+)',re.M) regex_link=re.compile(r'('+LINK+r')|\[\[(?P.+?)\]\]',re.S) regex_link_level2=re.compile(r'^(?P\S.*?)?(?:\s+\[(?P.+?)\])?(?:\s+(?P\S+))?(?:\s+(?P

popup))?\s*$',re.S) regex_media_level2=re.compile(r'^(?P\S.*?)?(?:\s+\[(?P.+?)\])?(?:\s+(?P\S+))?\s+(?P

img|IMG|left|right|center|video|audio|blockleft|blockright)(?:\s+(?P\d+px))?\s*$',re.S) @@ -648,7 +648,9 @@ def autolinks_simple(url): image, video or audio tag """ u_url=url.lower() - if u_url.endswith(('.jpg','.jpeg','.gif','.png')): + if '@' in url and not '://' in url: + return '%s' % (url, url) + elif u_url.endswith(('.jpg','.jpeg','.gif','.png')): return '' % url elif u_url.endswith(('.mp4','.mpeg','.mov','.ogv')): return '' % url @@ -673,6 +675,9 @@ def protolinks_simple(proto, url): return 'QR Code'%url return proto+':'+url +def email_simple(email): + return '%s' % (email, email) + def render(text, extra={}, allowed={}, From a4416bd11f94bc05373c4463ac3f547932c0b53d Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 17 Dec 2013 16:40:44 -0600 Subject: [PATCH 018/302] fixed issue 1819:Datastore reconnect problem, thanks Alan --- VERSION | 2 +- gluon/dal.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index ae14e219..946fe36c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.16.21.55.21 +Version 2.8.2-stable+timestamp.2013.12.17.16.39.21 diff --git a/gluon/dal.py b/gluon/dal.py index 47be7dbc..3d7b33d2 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -703,7 +703,7 @@ class BaseAdapter(ConnectionPool): can_select_for_update = True dbpath = None folder = None - connector = lambda dbpath, adapter_args: None # __init__ should override this + connector = lambda *args, **kwargs: None # __init__ should override this TRUE = 'T' FALSE = 'F' @@ -4809,6 +4809,8 @@ class GoogleDatastoreAdapter(NoSQLAdapter): uploads_in_blob = True types = {} + # reconnect is not required for Datastore dbs + reconnect = lambda *args, **kwargs: None def file_exists(self, filename): pass def file_open(self, filename, mode='rb', lock=True): pass From 38de99fc9cefe0a4f7faaaba3fe710975fc261ad Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 17 Dec 2013 16:43:07 -0600 Subject: [PATCH 019/302] fixed 1820:uncaught pickling error with shell and app engine, thanks Alan --- VERSION | 2 +- gluon/contrib/shell.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 946fe36c..5e4667b0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.17.16.39.21 +Version 2.8.2-stable+timestamp.2013.12.17.16.41.58 diff --git a/gluon/contrib/shell.py b/gluon/contrib/shell.py index 4d206036..0a224100 100755 --- a/gluon/contrib/shell.py +++ b/gluon/contrib/shell.py @@ -258,7 +258,7 @@ def run(history, statement, env={}): if not name.startswith('__'): try: history.set_global(name, val) - except TypeError, ex: + except (TypeError, cPickle.PicklingError), ex: UNPICKLABLE_TYPES.append(type(val)) history.add_unpicklable(statement, new_globals.keys()) From 28b9d322a250d1b2c38aae039bd10ba0a7ba6fb5 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 17 Dec 2013 16:50:42 -0600 Subject: [PATCH 020/302] fixed 1821:RadioWidget and CheckboxesWidget wrong behavior, thanks Paolo Caruccio --- VERSION | 2 +- gluon/sqlhtml.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 5e4667b0..bee3b373 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.17.16.41.58 +Version 2.8.2-stable+timestamp.2013.12.17.16.49.17 diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index 0be5b768..2a417c78 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -45,6 +45,9 @@ except ImportError: table_field = re.compile('[\w_]+\.[\w_]+') widget_class = re.compile('^\w*') +def add_class(a,b): + return a+' '+b if a else b + def represent(field, value, record): f = field.represent if not callable(f): @@ -334,7 +337,7 @@ class RadioWidget(OptionsWidget): attr = cls._attributes(field, {}, **attributes) - attr['_class'] = attr.get('_class', 'web2py_radiowidget') + attr['_class'] = add_class(attr.get('_class'), 'web2py_radiowidget') requires = field.requires if not isinstance(requires, (list, tuple)): @@ -398,7 +401,7 @@ class CheckboxesWidget(OptionsWidget): values = [str(value)] attr = cls._attributes(field, {}, **attributes) - attr['_class'] = attr.get('_class', 'web2py_checkboxeswidget') + attr['_class'] = add_class(attr.get('_class'), 'web2py_checkboxeswidget') label = attr.get('label',True) From 42c0b7b0fa8ebfcd5da2146d9ba7192c59b54ff1 Mon Sep 17 00:00:00 2001 From: Alan Etkin Date: Wed, 18 Dec 2013 15:44:45 -0300 Subject: [PATCH 021/302] admin app: enhanced ticket support for gae --- applications/admin/controllers/default.py | 70 ++++++++++++----------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 00082613..2e616459 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -1093,11 +1093,12 @@ def design(): #Get crontab cronfolder = apath('%s/cron' % app, r=request) - if not os.path.exists(cronfolder): - os.mkdir(cronfolder) crontab = apath('%s/cron/crontab' % app, r=request) - if not os.path.exists(crontab): - safe_write(crontab, '#crontab') + if not is_gae: + if not os.path.exists(cronfolder): + os.mkdir(cronfolder) + if not os.path.exists(crontab): + safe_write(crontab, '#crontab') plugins = [] @@ -1505,8 +1506,11 @@ def errors(): import hashlib app = get_app() - - method = request.args(1) or 'new' if not is_gae else "dbnew" + if is_gae: + method = 'dbold' if ('old' in + (request.args(1) or '')) else 'dbnew' + else: + method = request.args(1) or 'new' db_ready = {} db_ready['status'] = get_ticket_storage(app) db_ready['errmessage'] = T( @@ -1573,32 +1577,30 @@ def errors(): for fn in tk_db(tk_table.id > 0).select(): try: error = pickle.loads(fn.ticket_data) - except AttributeError: + hash = hashlib.md5(error['traceback']).hexdigest() + + if hash in delete_hashes: + tk_db(tk_table.id == fn.id).delete() + tk_db.commit() + else: + try: + hash2error[hash]['count'] += 1 + except KeyError: + error_lines = error['traceback'].split("\n") + last_line = error_lines[-2] + error_causer = os.path.split(error['layer'])[1] + hash2error[hash] = dict(count=1, + pickel=error, causer=error_causer, + last_line=last_line, hash=hash, + ticket=fn.ticket_id) + except AttributeError, e: tk_db(tk_table.id == fn.id).delete() tk_db.commit() - hash = hashlib.md5(error['traceback']).hexdigest() - - if hash in delete_hashes: - tk_db(tk_table.id == fn.id).delete() - tk_db.commit() - else: - try: - hash2error['hash']['count'] += 1 - except KeyError: - error_lines = error['traceback'].split("\n") - last_line = error_lines[-2] - error_causer = os.path.split(error['layer'])[1] - hash2error[hash] = dict(count=1, pickel=error, - causer=error_causer, - last_line=last_line, - hash=hash, ticket=fn.ticket_id) - decorated = [(x['count'], x) for x in hash2error.values()] - decorated.sort(key=operator.itemgetter(0), reverse=True) - - return dict(errors=[x[1] for x in decorated], app=app, method=method, db_ready=db_ready) + return dict(errors=[x[1] for x in decorated], app=app, + method=method, db_ready=db_ready) elif method == 'dbold': tk_db, tk_table = get_ticket_storage(app) @@ -1606,16 +1608,18 @@ def errors(): if item[:7] == 'delete_': tk_db(tk_table.ticket_id == item[7:]).delete() tk_db.commit() - tickets_ = tk_db(tk_table.id > 0).select(tk_table.ticket_id, tk_table.created_datetime, orderby=~tk_table.created_datetime) + tickets_ = tk_db(tk_table.id > 0).select(tk_table.ticket_id, + tk_table.created_datetime, + orderby=~tk_table.created_datetime) tickets = [row.ticket_id for row in tickets_] - times = dict( - [(row.ticket_id, row.created_datetime) for row in tickets_]) - - return dict(app=app, tickets=tickets, method=method, times=times, db_ready=db_ready) + times = dict([(row.ticket_id, row.created_datetime) for + row in tickets_]) + return dict(app=app, tickets=tickets, method=method, + times=times, db_ready=db_ready) else: for item in request.vars: - # delete_all} rows doesn't contain any ticket + # delete_all rows doesn't contain any ticket # Remove anything else as requested if item[:7] == 'delete_' and (not item == "delete_all}"): os.unlink(apath('%s/errors/%s' % (app, item[7:]), r=request)) From d72d5c64e2edebb63a7f9f23c0de102c0f628f78 Mon Sep 17 00:00:00 2001 From: ilvalle Date: Thu, 19 Dec 2013 09:52:38 +0100 Subject: [PATCH 022/302] fix issue 1825 --- applications/admin/static/js/web2py_bootstrap.js | 6 +++--- applications/examples/static/js/web2py_bootstrap.js | 6 +++--- applications/welcome/static/js/web2py_bootstrap.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/applications/admin/static/js/web2py_bootstrap.js b/applications/admin/static/js/web2py_bootstrap.js index edcb3628..7206cb1b 100644 --- a/applications/admin/static/js/web2py_bootstrap.js +++ b/applications/admin/static/js/web2py_bootstrap.js @@ -20,14 +20,14 @@ jQuery(function(){ function hoverMenu(){ jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){ adjust_height_of_collapsed_nav(); - mi = jQuery(this).addClass('open'); + var mi = jQuery(this).addClass('open'); mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400); }, function(){ - mi = jQuery(this); + var mi = jQuery(this); mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')}); }); } hoverMenu(); // first page load jQuery(window).resize(hoverMenu); // on resize event jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');}); -}); \ No newline at end of file +}); diff --git a/applications/examples/static/js/web2py_bootstrap.js b/applications/examples/static/js/web2py_bootstrap.js index edcb3628..7206cb1b 100644 --- a/applications/examples/static/js/web2py_bootstrap.js +++ b/applications/examples/static/js/web2py_bootstrap.js @@ -20,14 +20,14 @@ jQuery(function(){ function hoverMenu(){ jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){ adjust_height_of_collapsed_nav(); - mi = jQuery(this).addClass('open'); + var mi = jQuery(this).addClass('open'); mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400); }, function(){ - mi = jQuery(this); + var mi = jQuery(this); mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')}); }); } hoverMenu(); // first page load jQuery(window).resize(hoverMenu); // on resize event jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');}); -}); \ No newline at end of file +}); diff --git a/applications/welcome/static/js/web2py_bootstrap.js b/applications/welcome/static/js/web2py_bootstrap.js index edcb3628..7206cb1b 100644 --- a/applications/welcome/static/js/web2py_bootstrap.js +++ b/applications/welcome/static/js/web2py_bootstrap.js @@ -20,14 +20,14 @@ jQuery(function(){ function hoverMenu(){ jQuery('ul.nav a.dropdown-toggle').parent().hover(function(){ adjust_height_of_collapsed_nav(); - mi = jQuery(this).addClass('open'); + var mi = jQuery(this).addClass('open'); mi.children('.dropdown-menu').stop(true, true).delay(200).fadeIn(400); }, function(){ - mi = jQuery(this); + var mi = jQuery(this); mi.children('.dropdown-menu').stop(true, true).delay(200).fadeOut(function(){mi.removeClass('open')}); }); } hoverMenu(); // first page load jQuery(window).resize(hoverMenu); // on resize event jQuery('ul.nav li.dropdown a').click(function(){window.location=jQuery(this).attr('href');}); -}); \ No newline at end of file +}); From 53f44086528764ab0e843b9a1d13f6145862396e Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 19 Dec 2013 20:25:48 -0600 Subject: [PATCH 023/302] fixed web2py.css 100% thanks DeanK --- VERSION | 2 +- applications/welcome/static/css/web2py.css | 2 +- gluon/contrib/populate.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index bee3b373..1c2f9528 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.17.16.49.17 +Version 2.8.2-stable+timestamp.2013.12.19.20.24.40 diff --git a/applications/welcome/static/css/web2py.css b/applications/welcome/static/css/web2py.css index 30d97035..dfba3fdd 100644 --- a/applications/welcome/static/css/web2py.css +++ b/applications/welcome/static/css/web2py.css @@ -36,7 +36,7 @@ audio {width:200px} .hidden {display:none;visibility:visible} .right {float:right; text-align:right} .left {float:left; text-align:left} -.center {width:100; text-align:center; vertical-align:middle} +.center {width:100%; text-align:center; vertical-align:middle} /** end **/ /* Sticky footer begin */ diff --git a/gluon/contrib/populate.py b/gluon/contrib/populate.py index 122a4d64..2930d119 100644 --- a/gluon/contrib/populate.py +++ b/gluon/contrib/populate.py @@ -266,5 +266,5 @@ def populate_generator(table, default=True, compute=False, contents={}): if __name__ == '__main__': ell = Learner() - ell.loadd(eval(IUP)) + ell.loadd(IUP) print ell.generate(1000, prefix=None) From c4a68e9e5a59ea6542e4087576c285d99dc92858 Mon Sep 17 00:00:00 2001 From: petergovers Date: Fri, 20 Dec 2013 20:33:29 +0100 Subject: [PATCH 024/302] Changed rpxAccount login_form due to end-of-life for Janrain IFRAME/embedded widget --- gluon/contrib/login_methods/rpx_account.py | 47 ++++++++++++---------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/gluon/contrib/login_methods/rpx_account.py b/gluon/contrib/login_methods/rpx_account.py index 0cd1c56a..0116f4a1 100644 --- a/gluon/contrib/login_methods/rpx_account.py +++ b/gluon/contrib/login_methods/rpx_account.py @@ -98,27 +98,32 @@ class RPXAccount(object): def login_form(self): request = self.request args = request.args - if self.embed: - JANRAIN_URL = \ - "https://%s.rpxnow.com/openid/embed?token_url=%s&language_preference=%s" - rpxform = IFRAME( - _src=JANRAIN_URL % ( - self.domain, self.token_url, self.language), - _scrolling="no", - _frameborder="no", - _style="width:400px;height:240px;") - else: - JANRAIN_URL = \ - "https://%s.rpxnow.com/openid/v2/signin?token_url=%s" - rpxform = DIV(SCRIPT(_src="https://rpxnow.com/openid/v2/widget", - _type="text/javascript"), - SCRIPT("RPXNOW.overlay = true;", - "RPXNOW.language_preference = '%s';" % self.language, - "RPXNOW.realm = '%s';" % self.domain, - "RPXNOW.token_url = '%s';" % self.token_url, - "RPXNOW.show();", - _type="text/javascript")) - return rpxform + rpxform = """ + +

""" % dict(token_url=self.token_url, domain=self.domain) + return XML(rpxform) def use_janrain(auth, filename='private/janrain.key', **kwargs): From afe3f306e723f6b0bc90d8831e0aa6efb9a515f3 Mon Sep 17 00:00:00 2001 From: petergovers Date: Fri, 20 Dec 2013 21:27:56 +0100 Subject: [PATCH 025/302] Revert "Changed rpxAccount login_form due to end-of-life for Janrain IFRAME/embedded widget" This reverts commit c4a68e9e5a59ea6542e4087576c285d99dc92858. --- gluon/contrib/login_methods/rpx_account.py | 47 ++++++++++------------ 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/gluon/contrib/login_methods/rpx_account.py b/gluon/contrib/login_methods/rpx_account.py index 0116f4a1..0cd1c56a 100644 --- a/gluon/contrib/login_methods/rpx_account.py +++ b/gluon/contrib/login_methods/rpx_account.py @@ -98,32 +98,27 @@ class RPXAccount(object): def login_form(self): request = self.request args = request.args - rpxform = """ - -
""" % dict(token_url=self.token_url, domain=self.domain) - return XML(rpxform) + if self.embed: + JANRAIN_URL = \ + "https://%s.rpxnow.com/openid/embed?token_url=%s&language_preference=%s" + rpxform = IFRAME( + _src=JANRAIN_URL % ( + self.domain, self.token_url, self.language), + _scrolling="no", + _frameborder="no", + _style="width:400px;height:240px;") + else: + JANRAIN_URL = \ + "https://%s.rpxnow.com/openid/v2/signin?token_url=%s" + rpxform = DIV(SCRIPT(_src="https://rpxnow.com/openid/v2/widget", + _type="text/javascript"), + SCRIPT("RPXNOW.overlay = true;", + "RPXNOW.language_preference = '%s';" % self.language, + "RPXNOW.realm = '%s';" % self.domain, + "RPXNOW.token_url = '%s';" % self.token_url, + "RPXNOW.show();", + _type="text/javascript")) + return rpxform def use_janrain(auth, filename='private/janrain.key', **kwargs): From 24283e7eeb289456b2fc17453b84fe79bce234ac Mon Sep 17 00:00:00 2001 From: petergovers Date: Fri, 20 Dec 2013 21:28:47 +0100 Subject: [PATCH 026/302] Modified RPXAccount to be backward compatible with older Web2py versions --- gluon/contrib/login_methods/rpx_account.py | 47 ++++++++++++---------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/gluon/contrib/login_methods/rpx_account.py b/gluon/contrib/login_methods/rpx_account.py index 0cd1c56a..d8c47eb6 100644 --- a/gluon/contrib/login_methods/rpx_account.py +++ b/gluon/contrib/login_methods/rpx_account.py @@ -98,27 +98,32 @@ class RPXAccount(object): def login_form(self): request = self.request args = request.args - if self.embed: - JANRAIN_URL = \ - "https://%s.rpxnow.com/openid/embed?token_url=%s&language_preference=%s" - rpxform = IFRAME( - _src=JANRAIN_URL % ( - self.domain, self.token_url, self.language), - _scrolling="no", - _frameborder="no", - _style="width:400px;height:240px;") - else: - JANRAIN_URL = \ - "https://%s.rpxnow.com/openid/v2/signin?token_url=%s" - rpxform = DIV(SCRIPT(_src="https://rpxnow.com/openid/v2/widget", - _type="text/javascript"), - SCRIPT("RPXNOW.overlay = true;", - "RPXNOW.language_preference = '%s';" % self.language, - "RPXNOW.realm = '%s';" % self.domain, - "RPXNOW.token_url = '%s';" % self.token_url, - "RPXNOW.show();", - _type="text/javascript")) - return rpxform + rpxform = """ + +
""" % (self.token_url, self.domain, self.domain) + return XML(rpxform) def use_janrain(auth, filename='private/janrain.key', **kwargs): From 257733e0cc9e60e9815f4733e8abcef42b4b4916 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 20 Dec 2013 15:09:50 -0600 Subject: [PATCH 027/302] fixed a bug in models_to_run, thanks Anthony --- VERSION | 2 +- gluon/compileapp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 1c2f9528..137d2c06 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.19.20.24.40 +Version 2.8.2-stable+timestamp.2013.12.20.15.08.47 diff --git a/gluon/compileapp.py b/gluon/compileapp.py index d0f5bc10..cec75ea2 100644 --- a/gluon/compileapp.py +++ b/gluon/compileapp.py @@ -528,7 +528,7 @@ def run_models_in(environment): models_to_run = None for model in models: if response.models_to_run != models_to_run: - regex = models_to_run = response.models_to_run + regex = models_to_run = response.models_to_run[:] if isinstance(regex, list): regex = re_compile('|'.join(regex)) if models_to_run: From 88ce19d99f6b1585f2a5e5f5c9f51d2d4bdf2795 Mon Sep 17 00:00:00 2001 From: ilvalle Date: Sat, 21 Dec 2013 15:32:20 +0100 Subject: [PATCH 028/302] Save current working session in online editor --- applications/admin/controllers/default.py | 24 ++++++++++++++--- applications/admin/languages/it.py | 3 ++- applications/admin/settings.cfg | 6 ++--- applications/admin/static/js/ajax_editor.js | 2 +- applications/admin/views/default/edit.html | 26 +++++++++++++++++++ .../admin/views/default/editor_sessions.html | 14 ++++++++++ gluon/tools.py | 2 +- 7 files changed, 67 insertions(+), 10 deletions(-) create mode 100644 applications/admin/views/default/editor_sessions.html diff --git a/applications/admin/controllers/default.py b/applications/admin/controllers/default.py index 2e616459..1cebd27a 100644 --- a/applications/admin/controllers/default.py +++ b/applications/admin/controllers/default.py @@ -574,10 +574,10 @@ def edit(): # Load json only if it is ajax edited... app = get_app(request.vars.app) app_path = apath(app, r=request) - editor_defaults={'theme':'web2py', 'editor': 'default', 'closetag': 'true', 'codefolding': 'false', 'tabwidth':'4', 'indentwithtabs':'false', 'linenumbers':'true', 'highlightline':'true'} + preferences={'theme':'web2py', 'editor': 'default', 'closetag': 'true', 'codefolding': 'false', 'tabwidth':'4', 'indentwithtabs':'false', 'linenumbers':'true', 'highlightline':'true'} config = Config(os.path.join(request.folder, 'settings.cfg'), - section='editor', default_values=editor_defaults) - preferences = config.read() + section='editor', default_values={}) + preferences.update(config.read()) if not(request.ajax) and not(is_mobile): # return the scaffolding, the rest will be through ajax requests @@ -589,7 +589,7 @@ def edit(): if request.post_vars: #save new preferences post_vars = request.post_vars.items() # Since unchecked checkbox are not serialized, we must set them as false by hand to store the correct preference in the settings - post_vars+= [(opt, 'false') for opt in editor_defaults if opt not in request.post_vars ] + post_vars+= [(opt, 'false') for opt in preferences if opt not in request.post_vars ] if config.save(post_vars): response.headers["web2py-component-flash"] = T('Preferences saved correctly') else: @@ -814,6 +814,22 @@ def todolist(): return {'todo':output, 'app': app} +def editor_sessions(): + config = Config(os.path.join(request.folder, 'settings.cfg'), + section='editor_sessions', default_values={}) + preferences = config.read() + + if request.vars.session_name and request.vars.files: + session_name = request.vars.session_name + files = request.vars.files + preferences.update({session_name:','.join(files)}) + if config.save(preferences.items()): + response.headers["web2py-component-flash"] = T('Session saved correctly') + else: + response.headers["web2py-component-flash"] = T('Session saved on session only') + + return response.render('default/editor_sessions.html', {'editor_sessions':preferences}) + def resolve(): """ """ diff --git a/applications/admin/languages/it.py b/applications/admin/languages/it.py index c2b1b567..957a6087 100644 --- a/applications/admin/languages/it.py +++ b/applications/admin/languages/it.py @@ -1,4 +1,4 @@ -# coding: utf8 +# -*- coding: utf-8 -*- { '!langcode!': 'it', '!langname!': 'Italiano', @@ -303,6 +303,7 @@ 'to previous version.': 'torna a versione precedente', 'To create a plugin, name a file/folder plugin_[name]': 'Per creare un plugin, chiamare un file o cartella plugin_[nome]', 'toggle breakpoint': 'toggle breakpoint', +'Toggle comment': 'Toggle comment', 'Toggle Fullscreen': 'Toggle Fullscreen', 'Traceback': 'Traceback', 'translation strings for the application': "stringhe di traduzioni per l'applicazione", diff --git a/applications/admin/settings.cfg b/applications/admin/settings.cfg index a278e05f..4127b27c 100644 --- a/applications/admin/settings.cfg +++ b/applications/admin/settings.cfg @@ -1,10 +1,10 @@ [DEFAULT] -theme = web2py -closetag = true -editor = default [editor] theme = web2py editor = default closetag = true +[editor_sessions] +welcome = welcome/models/db.py,welcome/controllers/default.py,welcome/views/default/index.html + diff --git a/applications/admin/static/js/ajax_editor.js b/applications/admin/static/js/ajax_editor.js index 8a7916a4..9e002397 100644 --- a/applications/admin/static/js/ajax_editor.js +++ b/applications/admin/static/js/ajax_editor.js @@ -260,7 +260,7 @@ function load_file(url, lineno) { if(typeof (json['plain_html']) !== undefined) { if($('#' + json['id']).length === 0 || json['force'] === true) { // Create a tab and put the code in it - var tab_header = '
  • ' + json['realfilename'] + '
  • '; + var tab_header = '
  • ' + json['realfilename'] + '
  • '; var tab_body = '
    ' + json['plain_html'] + '
    '; if(json['force'] === false) { $('#myTabContent').append($(tab_body)); // First load the body diff --git a/applications/admin/views/default/edit.html b/applications/admin/views/default/edit.html index 4e0aeac2..650752ca 100644 --- a/applications/admin/views/default/edit.html +++ b/applications/admin/views/default/edit.html @@ -208,6 +208,9 @@ $(document).on('click', 'a.font_button', function (e) {
    + +{{=LOAD('default', 'editor_sessions', ajax=True, _class='btn-group')}} + @@ -314,5 +317,28 @@ $(document).ready(function() { load_file(datum.link); $(this).val(''); }); + /* handlers to manage editor sessions + */ + $(document).on('click', '#save_session', function(e) { + e.preventDefault(); + var session_name=prompt("Session name","{{=app}}"); + + if (session_name!==null) { + files = $("[data-path]").map(function(){return $(this).data("path");}).get(); + data = JSON.stringify({ files: files, session_name:session_name}); + $.ajaxSetup({contentType: "application/json"}); + $.web2py.ajax_page("POST", "{{=URL('default', 'editor_sessions')}}", data, 'manage_sessions'); + } + }); + $(document).on('click', '#saved_sessions a[data-files]', function(e) { + e.preventDefault(); + files = $(this).data('files'); + array_files = files.split(','); + $.each(array_files, function(index, value) { + url = "{{=URL('default','edit')}}/" + value; + load_file(url); + }); + }); + diff --git a/applications/admin/views/default/editor_sessions.html b/applications/admin/views/default/editor_sessions.html new file mode 100644 index 00000000..fa904582 --- /dev/null +++ b/applications/admin/views/default/editor_sessions.html @@ -0,0 +1,14 @@ +
    + Saved session + +
    + diff --git a/gluon/tools.py b/gluon/tools.py index b0d4d3a5..131b7a8e 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -5893,7 +5893,7 @@ class Wiki(object): class Config(object): def __init__( self, - filename, + filename, section, default_values={} ): From 1a959baa728e1d59dc695a39cb99b8bae7c08129 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 23 Dec 2013 21:37:27 -0600 Subject: [PATCH 029/302] fixed problem with static_version in admin, issue 1832 --- VERSION | 2 +- applications/admin/models/0.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 137d2c06..233d8829 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2013.12.20.15.08.47 +Version 2.8.2-stable+timestamp.2013.12.23.21.36.22 diff --git a/applications/admin/models/0.py b/applications/admin/models/0.py index 669ffd27..8ba7420e 100644 --- a/applications/admin/models/0.py +++ b/applications/admin/models/0.py @@ -45,4 +45,4 @@ if 'adminLanguage' in request.cookies and not (request.cookies['adminLanguage'] T.force(request.cookies['adminLanguage'].value) #set static_version -response.static_version = '2.7.3' +response.static_version = open('VERSION').read().split(' ',1)[1].split('-')[0] From 08639e669161654ac96b0680bc0c57dbdefcbf06 Mon Sep 17 00:00:00 2001 From: niphlod Date: Fri, 27 Dec 2013 21:28:43 +0100 Subject: [PATCH 030/302] removed debug print statements --- applications/admin/views/default/editor_sessions.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/applications/admin/views/default/editor_sessions.html b/applications/admin/views/default/editor_sessions.html index fa904582..b457b7a7 100644 --- a/applications/admin/views/default/editor_sessions.html +++ b/applications/admin/views/default/editor_sessions.html @@ -3,9 +3,6 @@