Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor fixes.

  • Loading branch information...
commit b5cc91416e7b73a65edc2b9db17124208117588b 1 parent 92c1010
@meshy meshy authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 discussion/models.py
View
8 discussion/models.py
@@ -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(
Please sign in to comment.
Something went wrong with that request. Please try again.