Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Disable adding through the admin

Daniel Quinn351cd06ef703
diff --git a/src/documents/admin.py b/src/documents/admin.py
index 3022e3c61..e2062e1f1 100644
--- a/src/documents/admin.py
+++ b/src/documents/admin.py
@@ -62,6 +62,9 @@ class DocumentAdmin(CommonAdmin):
list_filter = ("tags", "correspondent", MonthListFilter)
ordering = ["-created", "correspondent"]
+ def has_add_permission(self, request):
+ return False
+
def created_(self, obj):
return obj.created.date().strftime("%Y-%m-%d")