- Add view to list available caches. - Add links to view and purge caches. - Add permissions. - Add events. - Add purge task. - Remove document image clear link and view. This is now handled by the file caching app. Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
28 lines
756 B
Python
28 lines
756 B
Python
from __future__ import absolute_import, unicode_literals
|
|
|
|
import logging
|
|
|
|
from django.contrib import messages
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from mayan.apps.common.generics import ConfirmView
|
|
|
|
from ..permissions import permission_document_tools
|
|
from ..tasks import task_scan_duplicates_all
|
|
|
|
__all__ = ('ScanDuplicatedDocuments',)
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class ScanDuplicatedDocuments(ConfirmView):
|
|
extra_context = {
|
|
'title': _('Scan for duplicated documents?')
|
|
}
|
|
view_permission = permission_document_tools
|
|
|
|
def view_action(self):
|
|
task_scan_duplicates_all.apply_async()
|
|
messages.success(
|
|
self.request, _('Duplicated document scan queued successfully.')
|
|
)
|