-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for queries with datetime #2
Comments
Hi, this TypeError seems raised by datetime.date method, not model field conversion. All supported types (which are listed in readme example and test cases) would be converted float type while performing in database, cause I handle it with to_timestamp() and it's indeed and just a float field. |
I tried with ipython interpreter:
Hope above comment helps :P |
Sorry, made a mistake with my imports (usage of >>> from datetime import date
>>> from my_models import MyModel
>>> m = MyModel.objects.create()
>>> m.created
datetime.datetime(2016, 12, 19, 13, 41, 8, 746901, tzinfo=<DstTzInfo 'Europe/Amsterdam' CET+1:00:00 STD>) The error now comes from Django:
The behaviour I'm aiming for ( It appears as though filtering on any date thingy doesn't work:
|
If you could help, PR is always welcome. 👍 I finished supporting 1.8 (which is also LTS version) around 1 years ago. But, you know, people are lazy, maybe I'll improve compatibility "sometime" :P |
When you have time to update for new verison? |
Oops, sorry. |
Hi! Thanks for this module! I was hoping I could use this to do queries based on
datetime
objects, but that doesn't seem possible. Is this something you've left out on purpose? Would it be very hard to implement (I could help with it, but might need some pointers :))?I'd expected the following to work:
It seems like this module could benefit from a symmetric API (
datetime
in,datetime
out, while in the background floats are used for storage). Right now I need to worry about implementation details when using this module, like doing queries with floats. I hope you can shed some light on this.The text was updated successfully, but these errors were encountered: