django-elasticsearch-dsl
django-elasticsearch-dsl copied to clipboard
get_instances_from_related for 2 model fields on same ForeignKey
hello. how to code "get_instances_from_related" for The following models : I want to index the "inject_type" model :
class myModel(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='inject_user' , null=True) which_user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='request_user' , null=True)
class inject_type(models.Model): myModel_field = models.ForeignKey(myModel, related_name='inject_type' , null=True)
thanks.
Any solution found for this? I have the same use case.
I have the same problem, any solution one year later ?
No solution yet. One year after.