+
+class MetaTagsView(View):
+ def get(self, request):
+ return HttpResponse(
+ 'let META_FIELDS = ' + json.dumps([
+ {
+ 'name': f.name,
+ 'required': f.required,
+ 'multiple': f.multiple,
+ 'uri': f.uri,
+ 'value_type': {
+ 'hasLanguage': f.value_type.has_language,
+ 'name': f.value_type.__name__,
+ }
+ }
+ for f in BookInfo.FIELDS
+ ]),
+ content_type='text/javascript')
+