admin model's exclude with single member tuple and no comma does not produce an error
|Reported by:||bparker||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Using django 1.1 I was creating an inline and left out a comma when using a single member tuple:
class UserProfileInline(admin.StackedInline): model = UserProfile exclude = ('old_password')
But no error was produced at all... django simply ignored the exclude line and acted like it wasn't there.
Also tried it with a normal ModelAdmin and experienced the same behavior:
class CommentAdmin(admin.ModelAdmin): list_display = ['reservation', 'text', 'created_by', 'created_date'] save_as = True exclude = ('assignment') form = CommentAdminForm
Is this normal behavior?
Change History (8)
comment:1 Changed 7 years ago by
|Summary:||admin model inline's exclude with single member tuple and no comma does not produce an error → admin model's exclude with single member tuple and no comma does not produce an error|
comment:3 Changed 7 years ago by
|Component:||Uncategorized → django.contrib.admin|
|Triage Stage:||Unreviewed → Accepted|