I have the below model that includes a field called boxnumber When i don't use DAL, the verbose_name and help_text appear and get translated when needed.
But when adding DAL (see modelform below), it only shows the name, not translated and with no help text.
Any suggestions?
control/models.py:
from django.utils.translation import ugettext_lazy as _
class Command(models.Model):
....
boxnumber = models.ForeignKey(SmartBox, models.SET_NULL, blank=True, null=True,
help_text=_("the Smart Box # on this client"),
verbose_name=_('Box-Number')
)
class CommandForm(ModelForm):
class Meta:
model = Command
fields = [...,
'boxnumber',
... ]
boxnumber = forms.ModelChoiceField(
queryset=SmartBox.objects.all(),
widget=autocomplete.ModelSelect2(url='control/boxnumber-autocomplete',
forward=['group'])
) # adding this removes help_text and verbose_name
Info: DAL 3.1.8 Django 1.10.1 Python 3.4