updated docs, tests, misc
This commit is contained in:
@@ -35,7 +35,11 @@ class Command(NoArgsCommand):
|
||||
a=ModelA.objects.create(field1='A1')
|
||||
b=ModelB.objects.create(field1='B1', field2='B2')
|
||||
c=ModelC.objects.create(field1='C1', field2='C2', field3='C3')
|
||||
<<<<<<< HEAD:pexp/management/commands/p2cmd.py
|
||||
print ModelA.objects.extra( select={"select1": "field1 = 'A1'", "select2": "field1 = 'A0'"} )
|
||||
=======
|
||||
print ModelA.objects.extra( select={"select1": "field1 = 'A1'", "select2": "field1 != 'A1'"} )
|
||||
>>>>>>> 7c2be35... pexp:pexp/management/commands/p2cmd.py
|
||||
print
|
||||
|
||||
if not 'UUIDField' in globals(): return
|
||||
|
||||
@@ -10,7 +10,7 @@ import settings
|
||||
import sys
|
||||
from pexp.models import *
|
||||
|
||||
num_objects=15000
|
||||
num_objects=1000
|
||||
|
||||
def reset_queries():
|
||||
connection.queries=[]
|
||||
|
||||
@@ -5,7 +5,6 @@ from django.db import models
|
||||
from polymorphic import PolymorphicModel, PolymorphicManager, PolymorphicQuerySet
|
||||
from polymorphic.showfields import ShowFieldContent, ShowFieldType, ShowFieldTypeAndContent
|
||||
|
||||
|
||||
class Project(ShowFieldContent, PolymorphicModel):
|
||||
topic = models.CharField(max_length=30)
|
||||
class ArtProject(Project):
|
||||
@@ -27,7 +26,6 @@ class nModelB(nModelA):
|
||||
class nModelC(nModelB):
|
||||
field3 = models.CharField(max_length=10)
|
||||
|
||||
|
||||
# for Django 1.2+, test models with same names in different apps
|
||||
# (the other models with identical names are in polymorphic/tests.py)
|
||||
from django import VERSION as django_VERSION
|
||||
|
||||
Reference in New Issue
Block a user