Django filter query on with property fields automatically calculated

前端 未结 3 698
深忆病人
深忆病人 2020-12-17 14:04

There is Django Order model with property fields automatically calucated. How to do a filter query.

class Order(models.Model):

    @property
    def expire(         


        
3条回答
  •  悲&欢浪女
    2020-12-17 14:58

    I dont think you can use a property in the field lookups as the doc says The field specified in a lookup has to be the name of a model field https://docs.djangoproject.com/en/1.8/topics/db/queries/#field-lookups

提交回复
热议问题