if form.cleaned_data['generate_dc']:
data = librarian.wrap_text(data, unicode(date.today()))
if form.cleaned_data['generate_dc']:
data = librarian.wrap_text(data, unicode(date.today()))
doc = doc.quickwrite('xml', data.encode('utf-8'),
'$AUTO$ XML data uploaded.', user=request.user.username)
except Exception,e:
doc = doc.quickwrite('xml', data.encode('utf-8'),
'$AUTO$ XML data uploaded.', user=request.user.username)
except Exception,e:
except DocumentAlreadyExists:
# Document is already there
return response.EntityConflict().django_response(\
except DocumentAlreadyExists:
# Document is already there
return response.EntityConflict().django_response(\
return response.BadRequest().django_response({'reason': 'name-mismatch',
'message': 'Provided revision refers, to document "%s", but provided "%s"' % (document.id, docid) })
return response.BadRequest().django_response({'reason': 'name-mismatch',
'message': 'Provided revision refers, to document "%s", but provided "%s"' % (document.id, docid) })
except (EntryNotFound, RevisionNotFound), e:
return response.EntityNotFound().django_response({
'exception': type(e), 'message': e.message})
except (EntryNotFound, RevisionNotFound), e:
return response.EntityNotFound().django_response({
'exception': type(e), 'message': e.message})
"parent_user_resivion": udoc.revision,
"parent_revision": doc.revision,
"parent_user_resivion": udoc.revision,
"parent_revision": doc.revision,
- "revision": ndoc.revision,
- 'timestamp': ndoc.revision.timestamp,
+ "revision": nudoc.revision,
+ 'timestamp': nudoc.revision.timestamp,