Skip to content
Advertisement

How to filter based on referencing values? django

My model

JavaScript

My goal is to get values that greater or equal the max or less than or equal the min. But, how to reference the max or min value from inside MyCell.objects.filter

JavaScript

Advertisement

Answer

You can compare your MyCell.Value and MyColumn.max with F() expressions.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement