[Answered ]-Django – (admin.E015) The value of 'exclude' contains duplicate field(s)

1👍

You should write the list as:

@admin.register(Step)
class StepAdmin(admin.ModelAdmin):
    list_display = ['start_time', 'time', 'schedule']
    exclude = ['schedule']

By using list('schedule'), it will see the list as an iterable, and make a list:

>>> list('schedule')
['s', 'c', 'h', 'e', 'd', 'u', 'l', 'e']

Leave a comment