1
0
mirror of https://github.com/django/django.git synced 2025-10-30 17:16:10 +00:00

[1.7.x] Fixed #23420 - broken warning for unbound naive datetime objects

Fixed issue with warning message displayed for unbound naive datetime
objects when USE_TZ is True. Adds unit test that demonstrates the issue
(discoverable when using a custom lookup in MySQL).

Backport of ceb1ffcc8d from master.

Conflicts:
	tests/custom_lookups/tests.py
This commit is contained in:
Andy Chosak
2014-10-08 15:12:42 -04:00
committed by Anssi Kääriäinen
parent 74d0311d6b
commit 12e5b87b89
4 changed files with 48 additions and 5 deletions

View File

@@ -11,3 +11,11 @@ class Author(models.Model):
def __str__(self):
return self.name
@python_2_unicode_compatible
class MySQLUnixTimestamp(models.Model):
timestamp = models.PositiveIntegerField()
def __str__(self):
return self.name