web/views/timeline.py
branchstable
changeset 5377 84d14ddfae13
parent 4252 6c4f109c2b03
child 5389 809d3b5b3d31
--- a/web/views/timeline.py	Thu Apr 22 19:37:56 2010 +0000
+++ b/web/views/timeline.py	Thu Apr 22 19:48:04 2010 +0000
@@ -9,7 +9,10 @@
 """
 __docformat__ = "restructuredtext en"
 
-import simplejson
+try:
+    import json
+except ImportError:
+    import simplejson as json
 
 from logilab.mtconverter import xml_escape
 
@@ -40,7 +43,7 @@
                 events.append(event)
         timeline_data = {'dateTimeFormat': self.date_fmt,
                          'events': events}
-        self.w(simplejson.dumps(timeline_data))
+        self.w(json.dumps(timeline_data))
 
     # FIXME: those properties should be defined by the entity class
     def onclick_url(self, entity):