models.py
class Menu(models.Model):
...
has_submenu=models.BooleanField(default=1)
page=models.ForeignKey(Page,null=True)
I want django admin shows the page attribute only if has_submenu checkbox is false (So django-admin must write some javascript for me :) )
Maybe i must extend the render_change_form
method
Any advice?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…