Преглед изворни кода

add DocumentFileInline from metasynced

blezz-tech пре 4 месеци
родитељ
комит
29cf41795e
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      admin/documents.py

+ 5 - 1
admin/documents.py

@@ -2,7 +2,11 @@ from django.contrib import admin
 from dbsynce.models import Documents, DocumentFile
 
 
-
+class DocumentFileInline(admin.TabularInline):
+    model = DocumentFile
+    extra = 1
+    fields = ('file',)
+    can_delete = True
 
 
 @admin.register(Documents)