You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm surprised I haven't noticed this yet, but verbose_field_name is broken for reverse relationships that don't set related_name. This is an extension of #716. Example:
The downside would be that you'd lose the context of the reverse related name. Need to think about it, but not sure if it'd be more or less correct. Alternatively, we could do something like:
ifisinstance(part, ForeignObjectRel):
ifpart.related_name:
# not sure if pretty_name or just .replace(...)names.append(pretty_name(meta.verbose_name))
else:
meta=part.related_model._metanames.append(force_text(meta.verbose_name))
else:
names.append(force_text(part.verbose_name))
The text was updated successfully, but these errors were encountered:
I'm surprised I haven't noticed this yet, but
verbose_field_name
is broken for reverse relationships that don't setrelated_name
. This is an extension of #716. Example:verbose_field_name(User, 'article')
should returnarticle
, but chokes.I need to look into this further, but I'm thinking the following:
django-filter/django_filters/utils.py
Lines 250 to 256 in 7c08dee
should be:
The downside would be that you'd lose the context of the reverse related name. Need to think about it, but not sure if it'd be more or less correct. Alternatively, we could do something like:
The text was updated successfully, but these errors were encountered: