from django.contrib import admin

from .models import Annotation, AnnotationType, Export, Verification, ExportFormat

@admin.register(Annotation)
class AnnotationAdmin(admin.ModelAdmin):
    raw_id_fields = (
        'image',
    )


@admin.register(Verification)
class VerificationAdmin(admin.ModelAdmin):
    raw_id_fields = (
        'annotation',
    )


admin.site.register(AnnotationType)
admin.site.register(Export)
admin.site.register(ExportFormat)

from django.contrib import admin

from .models import Annotation, AnnotationType, Export, Verification, ExportFormat

admin.site.register(Annotation)
admin.site.register(AnnotationType)
admin.site.register(Export)
admin.site.register(Verification)
admin.site.register(ExportFormat)

--- 
+++ 
@@ -2,8 +2,20 @@
 
 from .models import Annotation, AnnotationType, Export, Verification, ExportFormat
 
-admin.site.register(Annotation)
+@admin.register(Annotation)
+class AnnotationAdmin(admin.ModelAdmin):
+    raw_id_fields = (
+        'image',
+    )
+
+
+@admin.register(Verification)
+class VerificationAdmin(admin.ModelAdmin):
+    raw_id_fields = (
+        'annotation',
+    )
+
+
 admin.site.register(AnnotationType)
 admin.site.register(Export)
-admin.site.register(Verification)
 admin.site.register(ExportFormat)
Use raw id fields for annotation and verification foreign keys
