2008-08-09 17:19:23 +00:00
|
|
|
"""
|
|
|
|
Tests for forcing insert and update queries (instead of Django's normal
|
|
|
|
automatic behaviour).
|
|
|
|
"""
|
2011-07-13 09:35:51 +00:00
|
|
|
from django.db import models
|
2008-08-09 17:19:23 +00:00
|
|
|
|
2011-10-13 18:04:12 +00:00
|
|
|
|
2008-08-09 17:19:23 +00:00
|
|
|
class Counter(models.Model):
|
|
|
|
name = models.CharField(max_length = 10)
|
|
|
|
value = models.IntegerField()
|
|
|
|
|
2011-11-12 19:06:39 +00:00
|
|
|
class InheritedCounter(Counter):
|
|
|
|
tag = models.CharField(max_length=10)
|
|
|
|
|
|
|
|
class ProxyCounter(Counter):
|
|
|
|
class Meta:
|
|
|
|
proxy = True
|
|
|
|
|
|
|
|
class SubCounter(Counter):
|
|
|
|
pass
|
|
|
|
|
2008-08-09 17:19:23 +00:00
|
|
|
class WithCustomPK(models.Model):
|
|
|
|
name = models.IntegerField(primary_key=True)
|
|
|
|
value = models.IntegerField()
|