#10893 closed (fixed)
list_editable breaks when primary_key=True in model
Reported by: | Tom Novelli | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Error message: Caught an exception while rendering: "Key 'iso' not found in Form"
Django version 1.1 beta 1 SVN-10620
Code:
class Language(models.Model): iso = models.CharField(max_length=5, primary_key=True) name = models.CharField(max_length=50) english_name = models.CharField(max_length=50) shortlist = models.BooleanField(default=False) class LanguageAdmin(admin.ModelAdmin): list_display = ['iso', 'shortlist', 'english_name', 'name'] admin.site.register(Language, LanguageAdmin)
Attachments (2)
Change History (8)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Component: | Uncategorized → django.contrib.admin |
---|---|
milestone: | → 1.1 |
Triage Stage: | Unreviewed → Accepted |
Can you post the full traceback?
by , 16 years ago
Attachment: | list-editable.diff added |
---|
comment:4 by , 16 years ago
Has patch: | set |
---|
by , 16 years ago
Attachment: | list_editable.2.diff added |
---|
fixed whitespace strangeness in tests.py diff, updated for trunk@10675
Note:
See TracTickets
for help on using tickets.
Sorry, that should be: