Answer the question
In order to leave comments, you need to log in
Why does django_admin_log show the name of the field in the change_message field and not the value specified in verbose_name?
Hello.
There is a model, verbose_name is specified in the fields, the value from verbose_name is shown everywhere in the django administrative interface. And the name of the model fields is still indicated in django_admin_log. For example - "Id_location has been changed.", why is this happening and how can I specify that when acting on an object, not the name, but the value from verbose_name is indicated?
class Spr_location(models.Model):
name = models.CharField(max_length=20, verbose_name=u'Местоположение')
cdate = models.DateTimeField(blank=True, verbose_name=u'Дата')
class Meta:
verbose_name = (u'Справочник местоположений')
verbose_name_plural = (u'Справочник местоположений')
def __unicode__(self):
return unicode(self.name)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question