Changes between Version 6 and Version 7 of CookBookMultiLevelMultiComponentDataModel
- Timestamp:
- Oct 27, 2005, 1:18:20 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookMultiLevelMultiComponentDataModel
v6 v7 10 10 11 11 class Document(meta.Model): 12 fields = ( 13 meta.CharField('short_name', maxlength=30), 14 meta.CharField('title', maxlength=100), 15 ) 12 short_name = meta.CharField(maxlength=30) 13 title = meta.CharField(maxlength=100) 16 14 17 15 def __repr__(self): 18 16 return self.title 19 17 20 admin = meta.Admin() 18 class META: 19 admin = meta.Admin() 21 20 22 21 class Paragraph(meta.Model): 23 fields = ( 24 meta.ForeignKey( 22 document = meta.ForeignKey( 25 23 Document, 26 24 edit_inline=True, 27 25 num_in_admin=3, 28 num_extra_on_change=1 29 ), 30 meta.TextField('content'), 31 ) 26 num_extra_on_change=1 ) 27 content = meta.TextField() 32 28 33 29 def __repr__(self):