Changes between Initial Version and Version 9 of Ticket #13794
- Timestamp:
- Jan 28, 2013, 1:46:19 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13794
- Property Cc added
- Property Has patch set
- Property Keywords formset added
- Property Owner changed from to
- Property Triage Stage Unreviewed → Accepted
- Property Component django.contrib.admin → Forms
- Property Severity → Normal
- Property Type → Bug
- Property Easy pickings unset
- Property UI/UX unset
- Property Version 1.2 → 1.5-beta-1
-
Ticket #13794 – Description
initial v9 1 The problem occurs in the function __unicode__ of ModelB1 The problem occurs in the function `__unicode__` of `ModelB` 2 2 3 When editing a ModelA instance in admin site, all ModelB instances have a modela_id set to the pk of the ModelA instance, instead of the value of the to_field's field. And, when accessing to the field modela of a ModelB instance, a DoesNotExistexception is raised.3 When editing a `ModelA` instance in admin site, all `ModelB` instances have a `modela_id` set to the `pk` of the `ModelA` instance, instead of the value of the `to_field`'s field. And, when accessing to the field modela of a `ModelB` instance, a `DoesNotExist` exception is raised. 4 4 5 This problem does not occu sin the shell :5 This problem does not occur in the shell : 6 6 {{{ 7 7 In [3]: ModelA.objects.all()[0].modelb_set.all()[0].modela_id … … 16 16 17 17 {{{ 18 models.py18 # models.py 19 19 20 20 class ModelA(models.Model): … … 28 28 return u"%s" % self.modela 29 29 30 admin.py30 # admin.py 31 31 32 32 class ModelBInlineAdmin(admin.TabularInline): … … 38 38 39 39 admin.site.register(ModelA, ModelAAdmin) 40 41 40 }}}