svgui/pyjs/jsonrpc/django/jsonrpc.py
changeset 1741 dd94b9a68c61
parent 1740 b789b695b5c6
child 1746 45d6f5fba016
equal deleted inserted replaced
1740:b789b695b5c6 1741:dd94b9a68c61
   176         elif command.has_key('html'):
   176         elif command.has_key('html'):
   177             return {'success': True, 'html': f.as_table()}
   177             return {'success': True, 'html': f.as_table()}
   178 
   178 
   179         return "unrecognised command"
   179         return "unrecognised command"
   180 
   180 
   181 
       
   182 
       
   183 
       
   184 # The following is incredibly convenient for saving vast amounts of
   181 # The following is incredibly convenient for saving vast amounts of
   185 # coding, avoiding doing silly things like this:
   182 # coding, avoiding doing silly things like this:
   186 #     jsonresult = {'field1': djangoobject.field1,
   183 #     jsonresult = {'field1': djangoobject.field1,
   187 #                   'field2': djangoobject.date.strftime('%Y.%M'),
   184 #                   'field2': djangoobject.date.strftime('%Y.%M'),
   188 #                    ..... }
   185 #                    ..... }