Decimal and datetime filters not working

16 views
Skip to first unread message

Allan Oware

unread,
Jul 26, 2016, 2:44:44 PM7/26/16
to Tastypie
Hi all,

The following lte and gte filter queries returns 0 objects:


Here's models.py

class River(models.Model):
dt_timestamp = models.DateTimeField()
stage = models.DecimalField(max_digits=10, decimal_places=3, blank=True, null=True)
runoff = models.DecimalField(max_digits=10, decimal_places=3)


api.py

class RiverResults(ModelResource):
    class Meta:
        queryset = River.objects.all()
        resource_name = 'river'
        authorization = Authorization()
        filtering = {
            'user': ALL_WITH_RELATIONS,
            'dt_timestamp': ALL
            'stage': ALL,
            'runoff': ALL,
        }

In settings.py USE_TZ = False

Am running Postgresql 9.3, Django 1.6 and  Tastypie 0.12.2.
Not sure what am doing wrong.


Regards,
Allan

Seán Hayes

unread,
Jul 26, 2016, 2:59:28 PM7/26/16
to django-...@googlegroups.com
This group is not maintained, please ask on StackOverflow.

--
You received this message because you are subscribed to the Google Groups "Tastypie" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-tastyp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages