mirror of
https://github.com/django/django.git
synced 2025-09-23 18:52:57 +00:00
[1.6.x] Fixed #16433 -- Fixed a help_text/read only field interaction that caused an admin crash.
Thanks chris at cogdon.org for the report and admackin for the patch.
Backport of af953c45cc
from master
This commit is contained in:
parent
58157be5ad
commit
ef1259342b
4 changed files with 25 additions and 5 deletions
|
@ -450,6 +450,10 @@ class GadgetAdmin(admin.ModelAdmin):
|
|||
return CustomChangeList
|
||||
|
||||
|
||||
class ToppingAdmin(admin.ModelAdmin):
|
||||
readonly_fields = ('pizzas',)
|
||||
|
||||
|
||||
class PizzaAdmin(admin.ModelAdmin):
|
||||
readonly_fields = ('toppings',)
|
||||
|
||||
|
@ -755,7 +759,7 @@ site.register(Book, inlines=[ChapterInline])
|
|||
site.register(Promo)
|
||||
site.register(ChapterXtra1, ChapterXtra1Admin)
|
||||
site.register(Pizza, PizzaAdmin)
|
||||
site.register(Topping)
|
||||
site.register(Topping, ToppingAdmin)
|
||||
site.register(Album, AlbumAdmin)
|
||||
site.register(Question)
|
||||
site.register(Answer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue