Permalink
Browse files

Minor fixes.

  • Loading branch information...
1 parent 92c1010 commit b5cc91416e7b73a65edc2b9db17124208117588b @meshy meshy committed Apr 20, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 discussion/models.py
View
@@ -1,4 +1,5 @@
-import os
+import os
+
from django.contrib.auth.models import User
from django.db import models
from django.template.defaultfilters import date, time
@@ -18,6 +19,7 @@ def __unicode__(self):
def get_absolute_url(self):
return ('discussion', [self.slug])
+
class Post(models.Model):
discussion = models.ForeignKey(Discussion)
user = models.ForeignKey(User)
@@ -42,7 +44,7 @@ def attachment_filename(self):
@property
def prefix(self):
- return 'post-%d' % (self.pk or 0,)
+ return 'post-%d' % (self.pk or 0,)
class Comment(models.Model):
@@ -58,7 +60,7 @@ def attachment_filename(self):
return self.attachment and os.path.basename(self.attachment.name)
class Meta:
- ordering = ('time',)
+ ordering = ('time',)
def __unicode__(self):
return 'Comment by {user} at {time} on {date}'.format(

0 comments on commit b5cc914

Please sign in to comment.