elif format == 'xml':
return 'xml'
-# for item in request.META.get('HTTP_ACCEPT', '').split(','):
-# accept, sep, rest = item.strip().partition(';')
-# if accept == 'application/json':
-# return 'json'
-# elif accept == 'application/xml' or accept == 'text/xml':
-# return 'xml'
+ for item in request.META.get('HTTP_ACCEPT', '').split(','):
+ accept, sep, rest = item.strip().partition(';')
+ if accept == 'application/json':
+ return 'json'
+ elif accept == 'application/xml' or accept == 'text/xml':
+ return 'xml'
return 'text'