소스 검색

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)