TODO comment cleanups. Remove unused Document model method.
This commit is contained in:
@@ -348,8 +348,6 @@ class SingleObjectDetailView(ViewPermissionCheckMixin, ObjectPermissionCheckMixi
|
|||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
# TODO: check/test if ViewPermissionCheckMixin, ObjectPermissionCheckMixin are
|
|
||||||
# in the right MRO
|
|
||||||
class SingleObjectEditView(ViewPermissionCheckMixin, ObjectPermissionCheckMixin, ExtraContextMixin, RedirectionMixin, UpdateView):
|
class SingleObjectEditView(ViewPermissionCheckMixin, ObjectPermissionCheckMixin, ExtraContextMixin, RedirectionMixin, UpdateView):
|
||||||
template_name = 'appearance/generic_form.html'
|
template_name = 'appearance/generic_form.html'
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ class ObjectPermissionCheckMixin(object):
|
|||||||
return self.get_object()
|
return self.get_object()
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
|
|
||||||
if self.object_permission:
|
if self.object_permission:
|
||||||
try:
|
try:
|
||||||
Permission.check_permissions(
|
Permission.check_permissions(
|
||||||
|
|||||||
@@ -271,13 +271,6 @@ class Document(models.Model):
|
|||||||
def date_updated(self):
|
def date_updated(self):
|
||||||
return self.latest_version.timestamp
|
return self.latest_version.timestamp
|
||||||
|
|
||||||
# TODO: look to remove, only used by the OCR parser
|
|
||||||
def document_save_to_temp_dir(self, filename, buffer_size=1024 * 1024):
|
|
||||||
temporary_path = os.path.join(
|
|
||||||
setting_temporary_directory.value, filename
|
|
||||||
)
|
|
||||||
return self.save_to_file(temporary_path, buffer_size)
|
|
||||||
|
|
||||||
# TODO: rename to file_encoding
|
# TODO: rename to file_encoding
|
||||||
@property
|
@property
|
||||||
def file_mime_encoding(self):
|
def file_mime_encoding(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user