File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
from django .db import models
2
2
3
3
4
+ class Publisher (models .Model ):
5
+ name = models .CharField (max_length = 50 )
6
+ address = models .CharField (max_length = 100 )
7
+ website = models .URLField ()
8
+
9
+ def __unicode__ (self ):
10
+ return self .name
11
+
12
+
4
13
class Book (models .Model ):
5
14
title = models .CharField (max_length = 100 )
6
15
authors = models .ManyToManyField ('Author' )
@@ -16,14 +25,5 @@ class Author(models.Model):
16
25
name = models .CharField (max_length = 50 )
17
26
email = models .EmailField ()
18
27
19
- def __unicode__ (self ):
20
- return self .name
21
-
22
-
23
- class Publisher (models .Model ):
24
- name = models .CharField (max_length = 50 )
25
- address = models .CharField (max_length = 100 )
26
- website = models .URLField ()
27
-
28
28
def __unicode__ (self ):
29
29
return self .name
You can’t perform that action at this time.
0 commit comments