Conversation
|
Thanks! I am wondering though, can't we get rid of the "pagemore_ts" parameter you introduced? It should be possible to derive whether or not the field you sort on is a timestamp from the _meta of the model/field itself instead of passing this to/from the client. |
|
It's not possible, because the field will not be on the model you have a queryset for if the __ trick is used. Additionally, at the moment you use it, no query has been done yet, so you cannot just use the first result from the query. It would be possible to do this fields that do not use the __ trick and only add the parameter for deeper fields. |
|
This is possible. Here's an example using the standard Django auth models, where you can filter on accessor fields like this: In order to get your hands on the type of the So basically you can check what the type of the field ( |
In order to make this work, I had to do the datetime check differently. Also made timestamps a float to support higher resolutions.