Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge remote branch 'brosner/master'

  • Loading branch information...
commit d8b5da5c771ecd0c7a881e79be6bd7a2858b9b43 2 parents 33398b1 + ce12f45
@dgoldenichec authored
Showing with 5 additions and 6 deletions.
  1. +1 −2  timezones/__init__.py
  2. +4 −4 timezones/fields.py
View
3  timezones/__init__.py
@@ -1,5 +1,4 @@
-VERSION = (0, 2, 0, "dev", 1)
-
+VERSION = (0, 2, 0, "dev", 2)
def get_version():
View
8 timezones/fields.py
@@ -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):
Please sign in to comment.
Something went wrong with that request. Please try again.