IMPORTANT: DB schema changed: Django's ContentType is now used

instead of app-label and model-name (suggested by Ilya Semenov in issue 3).
This is a cleaner and more efficient solution, and applabel/modelname
are not stored redundantly in additional tables any more (the polymorphic models).
This should be the final DB schema now (sorry for any inconvenience).
Also some minor documentation updates.
This commit is contained in:
Bert Constantin
2010-01-25 17:46:45 +01:00
parent da599856b6
commit c2b420aea0
6 changed files with 121 additions and 115 deletions
+4 -3
View File
@@ -7,6 +7,7 @@ from django.core.management.base import NoArgsCommand
from django.db.models import connection
from poly.models import *
from pprint import pprint
import settings
def reset_queries():
connection.queries=[]
@@ -18,9 +19,9 @@ class Command(NoArgsCommand):
help = ""
def handle_noargs(self, **options):
print "polycmd"
print 'polycmd - sqlite test db is stored in:',settings.DATABASE_NAME
print
Project.objects.all().delete()
o=Project.objects.create(topic="John's gathering")
o=ArtProject.objects.create(topic="Sculpting with Tim", artist="T. Turner")