equal
deleted
inserted
replaced
51 break |
51 break |
52 else: |
52 else: |
53 return True |
53 return True |
54 return False |
54 return False |
55 |
55 |
56 VID_BY_MIMETYPE = {'text/xml': 'xml', |
56 # FIXME: VID_BY_MIMETYPE is unfortunately a bit too naive since |
57 # XXX rss, owl... |
57 # some browsers (e.g. FF2) send a bunch of mimetypes in |
58 } |
58 # the Accept header, for instance: |
|
59 # text/xml,application/xml,application/xhtml+xml,text/html;q=0.9, |
|
60 # text/plain;q=0.8,image/png,*/*;q=0.5 |
|
61 VID_BY_MIMETYPE = { |
|
62 #'text/xml': 'xml', |
|
63 # XXX rss, owl... |
|
64 } |
59 def vid_from_rset(req, rset, schema): |
65 def vid_from_rset(req, rset, schema): |
60 """given a result set, return a view id""" |
66 """given a result set, return a view id""" |
61 if rset is None: |
67 if rset is None: |
62 return 'index' |
68 return 'index' |
63 for mimetype in req.parse_accept_header('Accept'): |
69 for mimetype in req.parse_accept_header('Accept'): |