1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Made the database cache backend, which bypasses the ORM, compatible with time zone support.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin
2011-11-20 10:17:12 +00:00
parent f6ee168919
commit 7075e93256
3 changed files with 59 additions and 18 deletions

View File

@@ -1,11 +1,11 @@
from datetime import datetime
from django.utils import timezone
from django.db import models
def expensive_calculation():
expensive_calculation.num_runs += 1
return datetime.now()
return timezone.now()
class Poll(models.Model):
question = models.CharField(max_length=200)