slug = models.SlugField()
content = models.TextField()
+ class Meta:
+ ordering = ["folder"]
+
def __str__(self):
return self.__unicode__()
def __unicode__(self):
- return u'%s (%s)' %(self.title, self.slug)
+ return u'%s - %s' %(self.get_basic_url(), self.title)
def save(self):
super(Document, self).save()
while curfolder != None:
folders.append(curfolder.slug)
curfolder = curfolder.parent
-
+
folders.reverse()
folderstring = "/".join(folders)
return folderstring
-
+
def save(self, force_insert=False, force_update=False):
super(Folder, self).save(force_insert, force_update)
if self.parent == None: