admin model's exclude with single member tuple and no comma does not produce an error
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?
Attachments
(1)
- 12689-1.diff
(2.5 KB
) - added by Ramiro Morales 15 years ago.
- Patch adding validation of 'exclude' option values, with tests
Download all attachments as:
.zip
Change History
(8)
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
|
Component: |
Uncategorized → django.contrib.admin
|
milestone: |
→ 1.2
|
Triage Stage: |
Unreviewed → Accepted
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Python version is 2.5.4