Changes between Initial Version and Version 9 of Ticket #13794


Ignore:
Timestamp:
01/28/2013 01:46:19 PM (7 years ago)
Author:
Aymeric Augustin
Comment:

Added a bit of markup for reaadability.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13794

    • Property Severity changed from to Normal
    • Property Cc ghayoun@… added
    • Property Component changed from django.contrib.admin to Forms
    • Property Owner changed from nobody to gautier
    • Property Version changed from 1.2 to 1.5-beta-1
    • Property Easy pickings unset
    • Property Keywords formset added
    • Property Has patch set
    • Property UI/UX unset
    • Property Type changed from to Bug
    • Property Triage Stage changed from Unreviewed to Accepted
  • 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