Skip to content

Commit

Permalink
Abstract models updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ellmetha committed Mar 14, 2015
1 parent 289bdc0 commit ee71f3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion machina/apps/forum/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class Meta:
verbose_name_plural = _('Forums')

def __str__(self):
return '{}'.format(self.name)
return self.name

@property
def margin_level(self):
Expand Down
6 changes: 3 additions & 3 deletions machina/apps/forum_conversation/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ class Meta:

def __str__(self):
if self.posts.exists():
return '{}'.format(self.posts.all().order_by('created')[0].subject)
return self.posts.all().order_by('created')[0].subject
else:
return '{}'.format(self.id)
return self.id

@property
def is_topic(self):
Expand Down Expand Up @@ -225,7 +225,7 @@ class Meta:
verbose_name_plural = _('Posts')

def __str__(self):
return '{}'.format(self.subject)
return self.subject

@property
def is_topic_head(self):
Expand Down
2 changes: 1 addition & 1 deletion machina/apps/forum_member/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class Meta:
verbose_name_plural = _('Profiles')

def __str__(self):
return '{}'.format(self.user.username)
return self.user.username

0 comments on commit ee71f3b

Please sign in to comment.