web/views/__init__.py
branchstable
changeset 6276 cb4a48b2250e
parent 5424 8ecbcbff9777
child 6377 3bb415310d4f
equal deleted inserted replaced
6275:20f30e01ae59 6276:cb4a48b2250e
    82     for mimetype in req.parse_accept_header('Accept'):
    82     for mimetype in req.parse_accept_header('Accept'):
    83         if mimetype in VID_BY_MIMETYPE:
    83         if mimetype in VID_BY_MIMETYPE:
    84             return VID_BY_MIMETYPE[mimetype]
    84             return VID_BY_MIMETYPE[mimetype]
    85     nb_rows = len(rset)
    85     nb_rows = len(rset)
    86     # empty resultset
    86     # empty resultset
    87     if nb_rows == 0 :
    87     if nb_rows == 0:
    88         return 'noresult'
    88         return 'noresult'
    89     # entity result set
    89     # entity result set
    90     if not schema.eschema(rset.description[0][0]).final:
    90     if not schema.eschema(rset.description[0][0]).final:
    91         if need_table_view(rset, schema):
    91         if need_table_view(rset, schema):
    92             return 'table'
    92             return 'table'