From bd0c8ea90442f3207abae070f821e90f932780c0 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Sun, 25 Feb 2018 14:36:38 +0100 Subject: [PATCH] Change the widget used by the navbar element description ref issue #1 --- navbar/admin.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/navbar/admin.py b/navbar/admin.py index 1dd8f38..efd32b7 100644 --- a/navbar/admin.py +++ b/navbar/admin.py @@ -1,9 +1,20 @@ from django.contrib import admin +from django import forms from .models import Element, ElementDescription, ElementSeparator +class ElementDescriptionAdminForm(forms.ModelForm): + class Meta: + model = ElementDescription + widgets = { + 'description': forms.widgets.Textarea, + } + fields = '__all__' + + class ElementDescriptionInline(admin.StackedInline): model = ElementDescription + form = ElementDescriptionAdminForm extra = 2