Changes between Initial Version and Version 3 of Ticket #12238


Ignore:
Timestamp:
Nov 19, 2009, 3:31:21 AM (14 years ago)
Author:
Ramiro Morales
Comment:

(reformat description, also it hasn't a patch until it has a patch)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12238

    • Property Component Uncategorizeddjango.contrib.admin
  • Ticket #12238 – Description

    initial v3  
    1 If a ModelForm is created and then modified to programatically add fields (say, in __init__), ModelAdmin ignores these fields when rendering the form.  If one of these fields is added to the ModelForm's Meta, the field shows up just fine.
     1If a ModelForm is created and then modified to programatically add fields (say, in `__init__`), !ModelAdmin ignores these fields when rendering the form.  If one of these fields is added to the !ModelForm's `Meta`, the field shows up just fine.
    22
    3 I would expect the field to display without the coaxing in Meta.fields.
     3I would expect the field to display without the coaxing in `Meta.fields`.
    44
    5 1. Create a ModelForm
    6 2. Add it to ModelAdmin
    7 3. View Form
    8 4. Update ModelForm's __init__ to include "self.fields['xyz'] = forms.CharField(max_length=255, initial='keke')"
    9 5. View Form (note no change)
    10 6. Update ModelForm's Meta.fields to include "xyz"
    11 7. View Form (note the change)
     5 1. Create a !ModelForm
     6 2. Add it to !ModelAdmin
     7 3. View Form
     8 4. Update !ModelForm's `__init__` to include `self.fields['xyz'] = forms.CharField(max_length=255, initial='keke')`
     9 5. View Form (note no change)
     10 6. Update !ModelForm's `Meta.fields` to include "xyz"
     11 7. View Form (note the change)
Back to Top