You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
421 B

from django.contrib import admin
from .models import AutoLabelingConfig
class AutoLabelingConfigAdmin(admin.ModelAdmin):
list_display = ('project', 'model_name', 'model_attrs',)
ordering = ('project',)
def get_readonly_fields(self, request, obj=None):
if obj:
return ["model_name"]
else:
return []
admin.site.register(AutoLabelingConfig, AutoLabelingConfigAdmin)