summaryrefslogtreecommitdiff
path: root/news/models.py
diff options
context:
space:
mode:
authoreliott <eliott@cactuswax.net>2007-12-29 16:42:55 -0800
committereliott <eliott@cactuswax.net>2007-12-29 16:42:55 -0800
commit3e297efad8e6dbb7622cedd68a2457f00dd09080 (patch)
tree1d66d932fa8e90bfa2c71f92d77a24b823831540 /news/models.py
parentff6d99b054efddb0725b0ddcbc81c58f7c8ce375 (diff)
Massive retab fest.
Also added vim command comment to the end of files.
Diffstat (limited to 'news/models.py')
-rw-r--r--news/models.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/news/models.py b/news/models.py
index 68d2865d..14837a5f 100644
--- a/news/models.py
+++ b/news/models.py
@@ -4,16 +4,19 @@ import re
from archweb_dev.utils import Stripper
class News(models.Model):
- id = models.AutoField(primary_key=True)
- author = models.ForeignKey(User)
- postdate = models.DateField(auto_now_add=True)
- title = models.CharField(maxlength=255)
- content = models.TextField()
- class Meta:
- db_table = 'news'
- verbose_name_plural = 'news'
- get_latest_by = 'postdate'
- ordering = ['-postdate', '-id']
+ id = models.AutoField(primary_key=True)
+ author = models.ForeignKey(User)
+ postdate = models.DateField(auto_now_add=True)
+ title = models.CharField(maxlength=255)
+ content = models.TextField()
+ class Meta:
+ db_table = 'news'
+ verbose_name_plural = 'news'
+ get_latest_by = 'postdate'
+ ordering = ['-postdate', '-id']
+
+ def get_absolute_url(self):
+ return '/news/%i/' % self.id
+
+# vim: set ts=4 sw=4 et:
- def get_absolute_url(self):
- return '/news/%i/' % self.id