X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/b1fb752ca1abb051a63da4729e34a80affc25c76..fb2d5b78a90d3042f7eb5e8e419fcbe6e62fd00d:/migdal/helpers.py diff --git a/migdal/helpers.py b/migdal/helpers.py index 39f5a60..1fdbdd4 100644 --- a/migdal/helpers.py +++ b/migdal/helpers.py @@ -34,9 +34,8 @@ def add_translatable(model, fields, languages=None): for name, field in fields.items(): for lang_code, lang_name in languages: new_field = copy(field) - if hasattr(field, 'verbose_name') and field.verbose_name: + if field.verbose_name: new_field.verbose_name = string_concat(field.verbose_name, ' [%s]' % lang_code) - new_field.contribute_to_class(model, "%s_%s" % (name, lang_code)) setattr(model, name, field_getter(name)) # add setter?