#14016: SQLite3 problem with date comparison --------------------------------------+------------------------------------- Reporter: anonymous | Owner: tzulberti Status: closed | Milestone: Component: ORM aggregation | Version: 1.2 Resolution: worksforme | Keywords: sqlite, date comparison Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | --------------------------------------+------------------------------------- Changes (by tzulberti):
* status: new => closed * resolution: => worksforme Comment: I don't have that problem. Feel free to change the change anything. The patch is an example I run against django code. Models: {{{ class Reporter(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) def __unicode__(self): return u"%s %s" % (self.first_name, self.last_name) class Article(models.Model): headline = models.CharField(max_length=100) pub_date = models.DateField() reporter = models.ForeignKey(Reporter) def __unicode__(self): return self.headline }}} The test: {{{ def test_regression_14016(self): reporter = models.Reporter.objects.create(first_name='Django', last_name='Spring') article = models.Article.objects.create( reporter=reporter, pub_date=datetime.date.today()) self.assertEquals(len(models.Article.objects.all()), 1) articles = models.Article.objects.filter( pub_date__gte = datetime.date.today()) self.assertEquals(len(articles), 1) articles = models.Article.objects.filter( pub_date__lte = datetime.date.today()) self.assertEquals(len(articles), 1) }}} -- Ticket URL: <http://code.djangoproject.com/ticket/14016#comment:2> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@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.