polymorphic_dumpdata management command functionality removed;

the regular Django dumpdata command now automatically works correctly
for polymorphic models and all Django versions
(this is handled by PolymorphicModelBase now).
Testing for dumpdata has been added.
This commit is contained in:
Bert Constantin
2010-10-18 17:39:06 +02:00
parent f05b854a54
commit a87481b8b5
12 changed files with 101 additions and 296 deletions
+40
View File
@@ -0,0 +1,40 @@
[
{
"pk": 1,
"model": "pexp.project",
"fields": {
"topic": "John's gathering",
"polymorphic_ctype": 2
}
},
{
"pk": 2,
"model": "pexp.project",
"fields": {
"topic": "Sculpting with Tim",
"polymorphic_ctype": 3
}
},
{
"pk": 3,
"model": "pexp.project",
"fields": {
"topic": "Swallow Aerodynamics",
"polymorphic_ctype": 4
}
},
{
"pk": 2,
"model": "pexp.artproject",
"fields": {
"artist": "T. Turner"
}
},
{
"pk": 3,
"model": "pexp.researchproject",
"fields": {
"supervisor": "Dr. Winter"
}
}
]
+1 -1
View File
@@ -20,7 +20,7 @@ class Command(NoArgsCommand):
help = ""
def handle_noargs(self, **options):
print 'polycmd - sqlite test db is stored in:',settings.DATABASE_NAME
print 'polycmd - sqlite test db is stored in:',settings.SQLITE_DB_PATH
print
"""
@@ -20,7 +20,7 @@ class Command(NoArgsCommand):
help = ""
def handle_noargs(self, **options):
#print 'polycmd - sqlite test db is stored in:',settings.SQLITE_DB_PATH
print 'polycmd - sqlite test db is stored in:',settings.SQLITE_DB_PATH
print
Project.objects.all().delete()