]> git.0d.be Git - chloro.git/blobdiff - chloro/phyll/models.py
views: add page to list notes by tag
[chloro.git] / chloro / phyll / models.py
index 587859dd4f76cfe5032b84f21debf71e8c4108ff..230738930d3be022e583bdfde77b5ddb6b141af0 100644 (file)
@@ -28,3 +28,9 @@ class Note(models.Model):
     tags = TaggableManager(_('Tags'), blank=True)
     creation_timestamp = models.DateTimeField(auto_now_add=True)
     last_update_timestamp = models.DateTimeField(auto_now=True)
+
+    class Meta:
+        ordering = ['-creation_timestamp']
+
+    def get_absolute_url(self):
+        return '/%s/' % self.slug