Hi Jonty,

While support for related_query_name was added in 1.6 it only supports 
app_label
and class_name interpolation since Django 1.10.

You can either upgrade to Django 1.10 or rely on related_name's support for 
app_label
and class_name interpolation as related_query_name defaults to related_name 
if
it's not explicitly defined.

Simon

Le vendredi 4 novembre 2016 12:40:00 UTC-4, Jonty Needham a écrit :
>
> Hi,
>
> In an attempt to fix my earlier query about related names etc, it would 
> appear that I've (half() fixed my issue.
>
> I now have:
>
>     submission = GenericRelation(
>         MyModel,
>         related_query_name='%(app_label)s_related_name')
>
> So that's good and gives me the related names. However, when I come to use 
> django filters, I get hit with the message:
>
> FieldError: Cannot resolve keyword 'my_app_name_related_name into field. 
> Choices are: %(app_label)s_related_name, etc etc etc.
>
>
> What is causing this and how do I not have this?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7bebac18-90b4-45ad-92d2-719bdbb0560b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to