geonode.documents.views ======================= .. py:module:: geonode.documents.views Attributes ---------- .. autoapisummary:: geonode.documents.views.logger geonode.documents.views.ALLOWED_DOC_TYPES geonode.documents.views._PERMISSION_MSG_DELETE geonode.documents.views._PERMISSION_MSG_GENERIC geonode.documents.views._PERMISSION_MSG_MODIFY geonode.documents.views._PERMISSION_MSG_METADATA geonode.documents.views._PERMISSION_MSG_VIEW Classes ------- .. autoapisummary:: geonode.documents.views.DocumentUploadView geonode.documents.views.DocumentUpdateView Functions --------- .. autoapisummary:: geonode.documents.views._resolve_document geonode.documents.views.document_download geonode.documents.views.document_link geonode.documents.views.document_embed geonode.documents.views.document_metadata geonode.documents.views.document_metadata_advanced geonode.documents.views.document_metadata_detail geonode.documents.views.document_batch_metadata Module Contents --------------- .. py:data:: logger .. py:data:: ALLOWED_DOC_TYPES .. py:data:: _PERMISSION_MSG_DELETE .. py:data:: _PERMISSION_MSG_GENERIC .. py:data:: _PERMISSION_MSG_MODIFY .. py:data:: _PERMISSION_MSG_METADATA .. py:data:: _PERMISSION_MSG_VIEW .. py:function:: _resolve_document(request, docid, permission='base.change_resourcebase', msg=_PERMISSION_MSG_GENERIC, **kwargs) Resolve the document by the provided primary key and check the optional permission. .. py:function:: document_download(request, docid) .. py:function:: document_link(request, docid) .. py:function:: document_embed(request, docid) .. py:class:: DocumentUploadView Bases: :py:obj:`django.views.generic.edit.CreateView` .. py:attribute:: http_method_names :value: ['post'] .. py:attribute:: form_class .. py:method:: post(request, *args, **kwargs) .. py:method:: get_context_data(**kwargs) .. py:method:: form_invalid(form) .. py:method:: form_valid(form) If the form is valid, save the associated model. .. py:class:: DocumentUpdateView Bases: :py:obj:`django.views.generic.edit.UpdateView` .. py:attribute:: template_name :value: 'documents/document_replace.html' .. py:attribute:: pk_url_kwarg :value: 'docid' .. py:attribute:: form_class .. py:attribute:: queryset .. py:attribute:: context_object_name :value: 'document' .. py:method:: post(request, *args, **kwargs) .. py:method:: get_context_data(**kwargs) .. py:method:: form_valid(form) If the form is valid, save the associated model. .. py:function:: document_metadata(request, docid, template='documents/document_metadata.html', panel_template='layouts/doc_panels.html', custom_metadata=None, ajax=True) .. py:function:: document_metadata_advanced(request, docid) .. py:function:: document_metadata_detail(request, docid, template='documents/document_metadata_detail.html', custom_metadata=None) .. py:function:: document_batch_metadata(request)