This commit is contained in:
mdipierro
2014-09-08 19:18:55 -05:00
parent 853beae9c6
commit b98687239c
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.9.9-stable+timestamp.2014.09.08.08.12.34
Version 2.9.9-stable+timestamp.2014.09.08.19.18.48
+10
View File
@@ -31,6 +31,7 @@ from gluon.storage import Storage
from gluon.utils import web2py_uuid, simple_hash, compare
from gluon.highlight import highlight
regex_crlf = re.compile('\r|\n')
join = ''.join
@@ -43,6 +44,7 @@ entitydefs.setdefault('apos', u"'".encode('utf-8'))
__all__ = [
'A',
'ASSIGNJS',
'B',
'BEAUTIFY',
'BODY',
@@ -2825,6 +2827,14 @@ class MARKMIN(XmlComponent):
def __str__(self):
return self.xml()
def ASSIGNJS(**kargs):
from serializers import json
s = ""
for key, value in kargs.items():
s+='var %s = %s;\n' % (key, json(value))
return XML(s)
if __name__ == '__main__':
import doctest
doctest.testmod()