Code

Changes between Version 1 and Version 2 of Ticket #2259, comment 29


Ignore:
Timestamp:
11/06/13 02:53:06 (6 months ago)
Author:
bouke
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2259, comment 29

    v1 v2  
    1 The proposed solution works for ModelAdmin forms, however it doesn't work with InlineModelAdmin as `get_readonly_fields` is passed the parent object, not the object regarding the InlineModelAdmin. Discussing with akaariair the solution could be found by setting `editable=models.EDITABLE_ON_INSERT`, using a fastened deprecation, as the default for primary key fields. 
     1The proposed solution works for ModelAdmin forms, however it doesn't work with InlineModelAdmin as `get_readonly_fields` is passed the parent object, not the object regarding the InlineModelAdmin. Discussing with akaariair the solution could be found by setting `editable=models.EDITABLE_ON_INSERT`, using a fastened deprecation, as the default for primary key fields. However I'm not familiar with the inner workings of modelform factories and cannot own this ticket.