Use autocomplete for member field in Certification admin
This commit is contained in:
parent
a892f11c0f
commit
030cbe8a92
@ -6,6 +6,7 @@ from .models import Member
|
||||
@admin.register(Member)
|
||||
class MemberAdmin(admin.ModelAdmin):
|
||||
readonly_fields = [field.name for field in Member._meta.get_fields() if field.concrete]
|
||||
search_fields = ['account_name']
|
||||
|
||||
def has_add_permission(self, request, obj=None):
|
||||
return False
|
||||
|
@ -13,6 +13,7 @@ class CertificationDefinitionAdmin(admin.ModelAdmin):
|
||||
@admin.register(Certification)
|
||||
class CertificationAdmin(admin.ModelAdmin):
|
||||
search_fields = ['name', 'certification__certification_name', 'certification__department']
|
||||
autocomplete_fields = ['member']
|
||||
|
||||
|
||||
@admin.register(InstructorOrVendor)
|
||||
|
Loading…
Reference in New Issue
Block a user