+ try:
+ doc_text = repo.get_file(path, user_branch)
+
+ document = parser.WLDocument.from_string(doc_text)
+ form = forms.DublinCoreForm(info=document.book_info)
+
+ return direct_to_template(request, 'explorer/panels/dceditor.html', extra_context={
+ 'fpath': path,
+ 'form': form,
+ })
+ except (ParseError, ValidationError), e:
+ return direct_to_template(request, 'explorer/panels/parse_error.html', extra_context={
+ 'fpath': path, 'exception_type': type(e).__name__, 'exception': e,
+ 'panel_name': 'Edytor DublinCore'})