2008-08-10 01:19:23 +08:00
|
|
|
"""
|
|
|
|
Tests for forcing insert and update queries (instead of Django's normal
|
|
|
|
automatic behaviour).
|
|
|
|
"""
|
2008-08-21 02:50:06 +08:00
|
|
|
from django.db import models, transaction, IntegrityError
|
2008-08-10 01:19:23 +08:00
|
|
|
|
|
|
|
class Counter(models.Model):
|
|
|
|
name = models.CharField(max_length = 10)
|
|
|
|
value = models.IntegerField()
|
|
|
|
|
|
|
|
class WithCustomPK(models.Model):
|
|
|
|
name = models.IntegerField(primary_key=True)
|
|
|
|
value = models.IntegerField()
|