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)

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)

Use raw id fields for annotation and verification foreign keys
Use raw id fields for annotation and verification foreign keys

  from django.contrib import admin
  
  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
## Code Before:
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)

## Instruction:
Use raw id fields for annotation and verification foreign keys
## Code After:
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)
