mirror of
https://github.com/django/django.git
synced 2025-11-02 04:48:33 +00:00
Fixed #13174 -- Fixed missing field label for readonly_fields when used in StackedInline, thanks to benc for the report and ptone for the investigation and initial patch.
* Corrected `InlineAdminForm.__init__` to pass along `model_admin` parameter in `super` call. * Lookup the field label in the form's model, not the `model_admin` model. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
459c71e332
commit
84de614529
3 changed files with 15 additions and 3 deletions
|
|
@ -38,11 +38,13 @@ class Holder(models.Model):
|
|||
class Inner(models.Model):
|
||||
dummy = models.IntegerField()
|
||||
holder = models.ForeignKey(Holder)
|
||||
readonly = models.CharField("Inner readonly label", max_length=1)
|
||||
|
||||
|
||||
class InnerInline(admin.StackedInline):
|
||||
model = Inner
|
||||
can_delete = False
|
||||
readonly_fields = ('readonly',) # For bug #13174 tests.
|
||||
|
||||
|
||||
class Holder2(models.Model):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue