Changes between Initial Version and Version 9 of Ticket #13794


Ignore:
Timestamp:
Jan 28, 2013, 1:46:19 PM (12 years ago)
Author:
Aymeric Augustin
Comment:

Added a bit of markup for reaadability.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13794

    • Property Cc ghayoun@… added
    • Property Has patch set
    • Property Keywords formset added
    • Property Owner changed from nobody to gautier
    • Property Triage Stage UnreviewedAccepted
    • Property Component django.contrib.adminForms
    • Property SeverityNormal
    • Property TypeBug
    • Property Easy pickings unset
    • Property UI/UX unset
    • Property Version 1.21.5-beta-1
  • Ticket #13794 – Description

    initial v9  
    1 The problem occurs in the function __unicode__ of ModelB
     1The problem occurs in the function `__unicode__` of `ModelB`
    22
    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.
     3When 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.
    44
    5 This problem does not occus in the shell :
     5This problem does not occur in the shell :
    66{{{
    77In [3]: ModelA.objects.all()[0].modelb_set.all()[0].modela_id
     
    1616
    1717{{{
    18 models.py
     18# models.py
    1919
    2020class ModelA(models.Model):
     
    2828        return u"%s" % self.modela
    2929
    30 admin.py
     30# admin.py
    3131
    3232class ModelBInlineAdmin(admin.TabularInline):
     
    3838
    3939admin.site.register(ModelA, ModelAAdmin)
    40 
    4140}}}
Back to Top