PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/modeltests/force_insert_update/models.py

https://code.google.com/p/mango-py/
Python | 13 lines | 2 code | 0 blank | 11 comment | 0 complexity | 5a60191fd8b6370fca5ecfec4c5f96ad MD5 | raw file
 1"""
 2Tests for forcing insert and update queries (instead of Django's normal
 3automatic behaviour).
 4"""
 5from django.db import models, transaction, IntegrityError
 6
 7class Counter(models.Model):
 8    name = models.CharField(max_length = 10)
 9    value = models.IntegerField()
10
11class WithCustomPK(models.Model):
12    name = models.IntegerField(primary_key=True)
13    value = models.IntegerField()