【发布时间】:2016-12-09 10:01:03
【问题描述】:
在django-rest-framework 中,如何使用大于过滤器过滤datetimefield。
class RestaurantList(generics.ListAPIView):
serializer_class = RestaurantSerializer
def get_queryset(self):
#This returns equals but if I use the > sign it does not work
return Restaurant.objects.filter(last_update_time = "2016-08-03")
【问题讨论】:
标签: python django-models django-views django-rest-framework django-serializer