mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-04-24 15:04:44 +00:00
Simplified exclusion of translation fields in grouped_fieldsets (thanks to Wojtek Ruszczewski for poiting this out).
This commit is contained in:
parent
47ff2681d0
commit
1dcdc1ebfe
1 changed files with 1 additions and 4 deletions
|
|
@ -241,10 +241,7 @@ class TranslationAdmin(TranslationBaseModelAdmin, admin.ModelAdmin):
|
|||
# Exclude non-editable fields
|
||||
and f.editable
|
||||
# Exclude the translation fields
|
||||
# TODO: I already miss localized_fieldnames_rev here ;)
|
||||
and f not in [
|
||||
k for l in [list(j) for i in self.trans_opts.fields.items() for
|
||||
j in i[1:]] for k in l]
|
||||
and not hasattr(f, 'translated_field')
|
||||
# Honour field arguments. We rely on the fact that the
|
||||
# passed fieldsets argument is already fully filtered
|
||||
# and takes options like exclude into account.
|
||||
|
|
|
|||
Loading…
Reference in a new issue