]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/bpcms/models.py
Make posted comments give a better message
[sommitrealweird.git] / sommitrealweird / bpcms / models.py
index ca3eb06a380326a3cda7142f9f0b9e2300cf3359..0cb821bdfdd80a2b55054cc76b7a22727f6a424e 100644 (file)
@@ -29,11 +29,14 @@ class Document(models.Model):
     slug = models.SlugField()
     content = models.TextField()
 
     slug = models.SlugField()
     content = models.TextField()
 
+    class Meta:
+        ordering = ["folder"]
+
     def __str__(self):
         return self.__unicode__()
 
     def __unicode__(self):
     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()
 
     def save(self):
         super(Document, self).save()
@@ -89,11 +92,11 @@ class Folder(models.Model):
         while curfolder != None:
             folders.append(curfolder.slug)
             curfolder = curfolder.parent
         while curfolder != None:
             folders.append(curfolder.slug)
             curfolder = curfolder.parent
-        
+
         folders.reverse()
         folderstring = "/".join(folders)
         return folderstring
         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:
     def save(self, force_insert=False, force_update=False):
         super(Folder, self).save(force_insert, force_update)
         if self.parent == None: