Opened 16 years ago
Closed 16 years ago
#7860 closed (duplicate)
db backends supports usecs feature in get_db_prep_lookup
Reported by: | wei guangjing | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The supports usecs feature not use in DateTimeField get_db_prep_lookp, so Datetime lookup will fail use MS SQL Server backend.
For example:
s = Session.objects.get( session_key = self.session_key, expire_date__gt=datetime.datetime.now() )
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | fix_supports_usecs.diff added |
---|
comment:1 by , 16 years ago
There is no built-in SQL Server backend (anymore); if you could log a bug with a repro case against the specific backend (django-pyodbc, django-mssql, etc.) that would be greatly appreciated (by the maintainers of those projects.)
comment:3 by , 16 years ago
This would be solved in a more clean and generic way by #7560 that is targeted at the 1.0 beta.
(The addition of the supports_usecs feature was part of #7420 that was partially applied in [7643], the intent was coincidentally facilitate the creation of an external MS SQL Server backend. But the feature wouldn't be needed anymore once #7560 lands.)
comment:5 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Yes, #7560 is the way we're going. I'm going to close this one as a "duplicate" of that (since there's not a "better solved by..." resolution).
fix supports usecs in DatetimeField, DateField, TimeField in get_db_prep_lookup