Revision created by MOE tool push_codebase.
[gae.git] / python / lib / django_1_2 / tests / modeltests / update / models.py
blob7b633e28dce8bc1db690625b90c5acd17a1c4780
1 """
2 Tests for the update() queryset method that allows in-place, multi-object
3 updates.
4 """
6 from django.db import models
8 class DataPoint(models.Model):
9 name = models.CharField(max_length=20)
10 value = models.CharField(max_length=20)
11 another_value = models.CharField(max_length=20, blank=True)
13 def __unicode__(self):
14 return unicode(self.name)
16 class RelatedPoint(models.Model):
17 name = models.CharField(max_length=20)
18 data = models.ForeignKey(DataPoint)
20 def __unicode__(self):
21 return unicode(self.name)
24 class A(models.Model):
25 x = models.IntegerField(default=10)
27 class B(models.Model):
28 a = models.ForeignKey(A)
29 y = models.IntegerField(default=10)
31 class C(models.Model):
32 y = models.IntegerField(default=10)
34 class D(C):
35 a = models.ForeignKey(A)