Permalink
Browse files

Merge remote branch 'brosner/master'

  • Loading branch information...
2 parents 33398b1 + ce12f45 commit d8b5da5c771ecd0c7a881e79be6bd7a2858b9b43 @dgoldenichec committed Mar 28, 2011
Showing with 5 additions and 6 deletions.
  1. +1 −2 timezones/__init__.py
  2. +4 −4 timezones/fields.py
View
@@ -1,5 +1,4 @@
-VERSION = (0, 2, 0, "dev", 1)
-
+VERSION = (0, 2, 0, "dev", 2)
def get_version():
View
@@ -83,7 +83,7 @@ def formfield(self, **kwargs):
defaults.update(kwargs)
return super(LocalizedDateTimeField, self).formfield(**defaults)
- def get_db_prep_save(self, value):
+ def get_db_prep_save(self, value, connection=None):
"""
Returns field's value prepared for saving into a database.
"""
@@ -93,9 +93,9 @@ def get_db_prep_save(self, value):
value = default_tz.localize(value)
else:
value = value.astimezone(default_tz)
- return super(LocalizedDateTimeField, self).get_db_prep_save(value)
+ return super(LocalizedDateTimeField, self).get_db_prep_save(value, connection=connection)
- def get_db_prep_lookup(self, lookup_type, value):
+ def get_db_prep_lookup(self, lookup_type, value, connection=None, prepared=None):
"""
Returns field's value prepared for database lookup.
"""
@@ -104,7 +104,7 @@ def get_db_prep_lookup(self, lookup_type, value):
value = default_tz.localize(value)
else:
value = value.astimezone(default_tz)
- return super(LocalizedDateTimeField, self).get_db_prep_lookup(lookup_type, value)
+ return super(LocalizedDateTimeField, self).get_db_prep_lookup(lookup_type, value, connection=connection, prepared=prepared)
def prep_localized_datetime(sender, **kwargs):

0 comments on commit d8b5da5

Please sign in to comment.