@block_user_agents
@login_required
@permission_required('wiki.restore_document')
@check_readonly
@process_document_path
def restore_document(request, document_slug, document_locale):
 document = get_object_or_404(Document.deleted_objects.all(), slug=document_slug, locale=document_locale)
 document.restore()
 return redirect(document)

@ block_user_agents @ login_required @ permission_required ( 'wiki.restore_document' ) @ check_readonly @ process_document_path def restore_document ( request , document_slug , document_locale ) : document = get_object_or_404 ( Document . deleted_objects . all ( ) , slug = document_slug , locale = document_locale ) document . restore ( ) return redirect ( document )
restore a deleted document .