fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
52a0445
)
Renamed ModelTagManager on Book and Fragment models to tagged and added new default...
author
Marek Stępniowski
<marek@stepniowski.com>
Sat, 6 Sep 2008 17:33:31 +0000
(19:33 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Sat, 6 Sep 2008 17:33:31 +0000
(19:33 +0200)
catalogue/models.py
patch
|
blob
|
history
diff --git
a/catalogue/models.py
b/catalogue/models.py
index
114b34b
..
f3f6bc2
100644
(file)
--- a/
catalogue/models.py
+++ b/
catalogue/models.py
@@
-81,9
+81,10
@@
class Book(models.Model):
odt_file = models.FileField(_('ODT file'), upload_to='books/odt', blank=True)
html_file = models.FileField(_('HTML file'), upload_to='books/html', blank=True)
odt_file = models.FileField(_('ODT file'), upload_to='books/odt', blank=True)
html_file = models.FileField(_('HTML file'), upload_to='books/html', blank=True)
- parent = models.ForeignKey('self', blank=True, null=True)
+ parent = models.ForeignKey('self', blank=True, null=True
, related_name='children'
)
- objects = managers.ModelTaggedItemManager(Tag)
+ objects = models.Manager()
+ tagged = managers.ModelTaggedItemManager(Tag)
tags = managers.TagDescriptor(Tag)
def short_html(self):
tags = managers.TagDescriptor(Tag)
def short_html(self):
@@
-209,7
+210,8
@@
class Fragment(models.Model):
anchor = models.IntegerField()
book = models.ForeignKey(Book, related_name='fragments')
anchor = models.IntegerField()
book = models.ForeignKey(Book, related_name='fragments')
- objects = managers.ModelTaggedItemManager(Tag)
+ objects = models.Manager()
+ tagged = managers.ModelTaggedItemManager(Tag)
tags = managers.TagDescriptor(Tag)
def short_html(self):
tags = managers.TagDescriptor(Tag)
def short_html(self):