WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 6a1aca1

Browse files
committed
add more books to demo app
1 parent c6c53d8 commit 6a1aca1

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

testapp/fixtures/data.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,20 @@
174174
"name": "Dennis Byrne"
175175
}
176176
},
177+
{
178+
"model": "testapp.author",
179+
"pk": 27,
180+
"fields": {
181+
"name": "David Gries"
182+
}
183+
},
184+
{
185+
"model": "testapp.author",
186+
"pk": 28,
187+
"fields": {
188+
"name": "Adam Johnson"
189+
}
190+
},
177191
{
178192
"model": "testapp.book",
179193
"pk": 1,
@@ -516,6 +530,42 @@
516530
"author": 26
517531
}
518532
},
533+
{
534+
"model": "testapp.book",
535+
"pk": 39,
536+
"fields": {
537+
"title": "The Science of Programming",
538+
"my_order": 42,
539+
"author": 27
540+
}
541+
},
542+
{
543+
"model": "testapp.book",
544+
"pk": 40,
545+
"fields": {
546+
"title": "Speed Up Your Django Tests",
547+
"my_order": 39,
548+
"author": 28
549+
}
550+
},
551+
{
552+
"model": "testapp.book",
553+
"pk": 41,
554+
"fields": {
555+
"title": "Boost Your Django DX",
556+
"my_order": 40,
557+
"author": 28
558+
}
559+
},
560+
{
561+
"model": "testapp.book",
562+
"pk": 42,
563+
"fields": {
564+
"title": "Boost Your GitHub DX",
565+
"my_order": 41,
566+
"author": 28
567+
}
568+
},
519569
{
520570
"model": "testapp.chapter",
521571
"pk": 1,

testapp/models.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ class Book(models.Model):
2323
blank=True,
2424
max_length=255,
2525
)
26-
2726
my_order = models.PositiveIntegerField(
2827
default=0,
2928
blank=False,
3029
null=False,
3130
db_index=True,
3231
)
33-
3432
author = models.ForeignKey(
3533
Author,
3634
null=True,

0 commit comments

Comments
 (0)