Renamed a field in the queries test schema that was preventing the tests from running in Oracle. I've opened #7109 to address the general problem. Refs #7109

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2008-04-28 17:31:08 +00:00
parent a97f690e5d
commit 13a6fd61c6
1 changed files with 4 additions and 4 deletions

View File

@ -120,13 +120,13 @@ class LoopZ(models.Model):
# A model and custom default manager combination.
class CustomManager(models.Manager):
def get_query_set(self):
return super(CustomManager, self).get_query_set().filter(public=True,
tag__name='t1')
qs = super(CustomManager, self).get_query_set()
return qs.filter(is_public=True, tag__name='t1')
class ManagedModel(models.Model):
data = models.CharField(max_length=10)
tag = models.ForeignKey(Tag)
public = models.BooleanField(default=True)
is_public = models.BooleanField(default=True)
objects = CustomManager()
normal_manager = models.Manager()
@ -698,7 +698,7 @@ More twisted cases, involving nested negations.
Bug #7095
Updates that are filtered on the model being updated are somewhat tricky to get
in MySQL. This exercises that case.
>>> mm = ManagedModel.objects.create(data='mm1', tag=t1, public=True)
>>> mm = ManagedModel.objects.create(data='mm1', tag=t1, is_public=True)
>>> ManagedModel.objects.update(data='mm')
"""}