1. """
    
  2. Tests for forcing insert and update queries (instead of Django's normal
    
  3. automatic behavior).
    
  4. """
    
  5. from django.db import models
    
  6. 
    
  7. 
    
  8. class Counter(models.Model):
    
  9.     name = models.CharField(max_length=10)
    
  10.     value = models.IntegerField()
    
  11. 
    
  12. 
    
  13. class InheritedCounter(Counter):
    
  14.     tag = models.CharField(max_length=10)
    
  15. 
    
  16. 
    
  17. class ProxyCounter(Counter):
    
  18.     class Meta:
    
  19.         proxy = True
    
  20. 
    
  21. 
    
  22. class SubCounter(Counter):
    
  23.     pass
    
  24. 
    
  25. 
    
  26. class WithCustomPK(models.Model):
    
  27.     name = models.IntegerField(primary_key=True)
    
  28.     value = models.IntegerField()