Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f724f9cb authored by Eva Bardou's avatar Eva Bardou
Browse files

Add OcrModelDocumentInlines in Django admin

parent d13f6a69
No related branches found
No related tags found
1 merge request!77Replace the FK towards Document on OcrModel by a M2M relation
This commit is part of merge request !77. Comments created here will be created in the context of that merge request.
...@@ -18,9 +18,13 @@ class MetadataInline(admin.TabularInline): ...@@ -18,9 +18,13 @@ class MetadataInline(admin.TabularInline):
model = DocumentMetadata model = DocumentMetadata
class OcrModelDocumentInline(admin.TabularInline):
model = OcrModelDocument
class DocumentAdmin(admin.ModelAdmin): class DocumentAdmin(admin.ModelAdmin):
list_display = ['pk', 'name', 'owner'] list_display = ['pk', 'name', 'owner']
inlines = (MetadataInline,) inlines = (MetadataInline, OcrModelDocumentInline)
class DocumentPartAdmin(admin.ModelAdmin): class DocumentPartAdmin(admin.ModelAdmin):
...@@ -43,6 +47,7 @@ class ScriptAdmin(admin.ModelAdmin): ...@@ -43,6 +47,7 @@ class ScriptAdmin(admin.ModelAdmin):
class OcrModelAdmin(admin.ModelAdmin): class OcrModelAdmin(admin.ModelAdmin):
list_display = ['name', 'job', 'owner', 'script', 'training'] list_display = ['name', 'job', 'owner', 'script', 'training']
inlines = (OcrModelDocumentInline,)
class OcrModelDocumentAdmin(admin.ModelAdmin): class OcrModelDocumentAdmin(admin.ModelAdmin):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment