Author: mtredinnick Date: 2009-04-11 21:05:43 -0500 (Sat, 11 Apr 2009) New Revision: 10531
Modified: django/branches/releases/1.0.X/django/db/backends/sqlite3/base.py django/branches/releases/1.0.X/django/db/models/fields/__init__.py Log: [1.0.X] Fixed #10071 -- Changed some internal database data representations. We now pass numbers used in data queries as actualy numbers (integers) to the database backends, rather than string forms. This is easier for some of the less flexible backeds. Patch from Leo Soto. Backport of r10530 from trunk. Modified: django/branches/releases/1.0.X/django/db/backends/sqlite3/base.py =================================================================== --- django/branches/releases/1.0.X/django/db/backends/sqlite3/base.py 2009-04-12 02:00:58 UTC (rev 10530) +++ django/branches/releases/1.0.X/django/db/backends/sqlite3/base.py 2009-04-12 02:05:43 UTC (rev 10531) @@ -187,7 +187,7 @@ dt = util.typecast_timestamp(dt) except (ValueError, TypeError): return None - return unicode(getattr(dt, lookup_type)) + return getattr(dt, lookup_type) def _sqlite_date_trunc(lookup_type, dt): try: Modified: django/branches/releases/1.0.X/django/db/models/fields/__init__.py =================================================================== --- django/branches/releases/1.0.X/django/db/models/fields/__init__.py 2009-04-12 02:00:58 UTC (rev 10530) +++ django/branches/releases/1.0.X/django/db/models/fields/__init__.py 2009-04-12 02:05:43 UTC (rev 10531) @@ -494,7 +494,7 @@ # For "__month" and "__day" lookups, convert the value to a string so # the database backend always sees a consistent type. if lookup_type in ('month', 'day'): - return [force_unicode(value)] + return [int(value)] return super(DateField, self).get_db_prep_lookup(lookup_type, value) def get_db_prep_value(self, value): --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---